Security Configuration Assessment Report

for controlplane

  • Target IP Address: 127.0.0.1

CIS Ubuntu Linux 18.04 LTS Benchmark v2.1.0

  • Level 1 - Server
  • Sunday, November 14 2021 08:05:57
  • Assessment Duration: 3 minutes, 4 seconds

Report generated by the Center for Internet Security's Configuration Assessment Tool (CIS-CAT Pro Assessor) v4.8.2.

For further information, please visit The Center for Internet Security or our Product Support page.

Copyright ©2021, The Center for Internet Security

Content generated on 11/14/2021 08:09 AM. Content last obtained on 08/09/2021 02:02 AM.

Summary

Description Tests Scoring
Pass Fail Error Unkn. Man. Score Max Percent
1 Initial Setup 23 19 0 0 7 23.0 42.0 55%
1.1 Filesystem Configuration 12 9 0 0 3 12.0 21.0 57%
1.1.1 Disable unused filesystems 0 6 0 0 0 0.0 6.0 0%
1.2 Configure Software Updates 0 0 0 0 2 0.0 0.0 0%
1.3 Filesystem Integrity Checking 0 2 0 0 0 0.0 2.0 0%
1.4 Secure Boot Settings 1 3 0 0 0 1.0 4.0 25%
1.5 Additional Process Hardening 2 1 0 0 1 2.0 3.0 67%
1.6 Mandatory Access Control 1 2 0 0 0 1.0 3.0 33%
1.6.1 Configure AppArmor 1 2 0 0 0 1.0 3.0 33%
1.7 Command Line Warning Banners 4 2 0 0 0 4.0 6.0 67%
1.8 GNOME Display Manager 3 0 0 0 0 3.0 3.0 100%
2 Services 23 2 0 0 2 23.0 25.0 92%
2.1 Special Purpose Services 18 1 0 0 1 18.0 19.0 95%
2.1.1 Time Synchronization 3 0 0 0 1 3.0 3.0 100%
2.2 Service Clients 5 1 0 0 0 5.0 6.0 83%
3 Network Configuration 7 27 0 0 6 7.0 34.0 21%
3.1 Disable unused network protocols and devices 1 0 0 0 0 1.0 1.0 100%
3.2 Network Parameters (Host Only) 0 2 0 0 0 0.0 2.0 0%
3.3 Network Parameters (Host and Router) 1 8 0 0 0 1.0 9.0 11%
3.4 Uncommon Network Protocols 0 0 0 0 0 0.0 0.0 0%
3.5 Firewall Configuration 5 17 0 0 6 5.0 22.0 23%
3.5.1 Configure UncomplicatedFirewall 1 4 0 0 2 1.0 5.0 20%
3.5.2 Configure nftables 1 7 0 0 2 1.0 8.0 12%
3.5.3 Configure iptables 3 6 0 0 2 3.0 9.0 33%
3.5.3.1 Configure iptables software 2 1 0 0 0 2.0 3.0 67%
3.5.3.2 Configure IPv4 iptables 0 3 0 0 1 0.0 3.0 0%
3.5.3.3 Configure IPv6 ip6tables 1 2 0 0 1 1.0 3.0 33%
4 Logging and Auditing 1 8 0 0 3 1.0 9.0 11%
4.1 Configure System Accounting (auditd) 0 0 0 0 0 0.0 0.0 0%
4.1.1 Ensure auditing is enabled 0 0 0 0 0 0.0 0.0 0%
4.1.2 Configure Data Retention 0 0 0 0 0 0.0 0.0 0%
4.2 Configure Logging 0 8 0 0 2 0.0 8.0 0%
4.2.1 Configure rsyslog 0 4 0 0 2 0.0 4.0 0%
4.2.2 Configure journald 0 3 0 0 0 0.0 3.0 0%
5 Access, Authentication and Authorization 17 29 0 0 1 17.0 46.0 37%
5.1 Configure time-based job schedulers 1 8 0 0 0 1.0 9.0 11%
5.2 Configure sudo 1 2 0 0 0 1.0 3.0 33%
5.3 Configure SSH Server 10 10 0 0 0 10.0 20.0 50%
5.4 Configure PAM 1 3 0 0 0 1.0 4.0 25%
5.5 User Accounts and Environment 4 5 0 0 0 4.0 9.0 44%
5.5.1 Set Shadow Password Suite Parameters 2 3 0 0 0 2.0 5.0 40%
6 System Maintenance 25 3 0 0 2 25.0 28.0 89%
6.1 System File Permissions 10 1 0 0 2 10.0 11.0 91%
6.2 User and Group Settings 15 2 0 0 0 15.0 17.0 88%
Total 96 88 0 0 21 96.0 184.0 52%

Note: Actual scores are subject to rounding errors. The sum of these values may not result in the exact overall score.

Profiles

This benchmark contains 4 profiles.The Level 1 - Server profile was used for this assessment.

Title Description
Level 1 - Server

Items in this profile intend to:

  • be practical and prudent;
  • provide a clear security benefit; and
  • not inhibit the utility of the technology beyond acceptable means.

This profile is intended for servers.

Show Profile XML
Level 2 - Server

This profile extends the "Level 1 - Server" profile. Items in this profile exhibit one or more of the following characteristics:

  • are intended for environments or use cases where security is paramount.
  • acts as defense in depth measure.
  • may negatively inhibit the utility or performance of the technology.

This profile is intended for servers.

Show Profile XML
Level 1 - Workstation

Items in this profile intend to:

  • be practical and prudent;
  • provide a clear security benefit; and
  • not inhibit the utility of the technology beyond acceptable means.

This profile is intended for workstations.

Show Profile XML
Level 2 - Workstation

This profile extends the "Level 1 - Workstation" profile. Items in this profile exhibit one or more of the following characteristics:

  • are intended for environments or use cases where security is paramount.
  • acts as defense in depth measure.
  • may negatively inhibit the utility or performance of the technology.

This profile is intended for workstations.

Show Profile XML

Assessment Results

w Benchmark Item Result
1 Initial Setup
1.1 Filesystem Configuration
1.1.1 Disable unused filesystems
1.0 1.1.1.1 Ensure mounting of cramfs filesystems is disabled Fail
1.0 1.1.1.2 Ensure mounting of freevxfs filesystems is disabled Fail
1.0 1.1.1.3 Ensure mounting of jffs2 filesystems is disabled Fail
1.0 1.1.1.4 Ensure mounting of hfs filesystems is disabled Fail
1.0 1.1.1.5 Ensure mounting of hfsplus filesystems is disabled Fail
1.0 1.1.1.6 Ensure mounting of udf filesystems is disabled Fail
1.0 1.1.2 Ensure /tmp is configured Fail
1.0 1.1.3 Ensure nodev option set on /tmp partition Fail
1.0 1.1.4 Ensure nosuid option set on /tmp partition Pass
1.0 1.1.5 Ensure noexec option set on /tmp partition Pass
1.0 1.1.6 Ensure /dev/shm is configured Pass
1.0 1.1.7 Ensure nodev option set on /dev/shm partition Pass
1.0 1.1.8 Ensure nosuid option set on /dev/shm partition Pass
1.0 1.1.9 Ensure noexec option set on /dev/shm partition Pass
1.0 1.1.12 Ensure /var/tmp partition includes the nodev option Pass
1.0 1.1.13 Ensure /var/tmp partition includes the nosuid option Pass
1.0 1.1.14 Ensure /var/tmp partition includes the noexec option Pass
1.0 1.1.18 Ensure /home partition includes the nodev option Pass


1.1.19 Ensure nodev option set on removable media partitions Manual


1.1.20 Ensure nosuid option set on removable media partitions Manual


1.1.21 Ensure noexec option set on removable media partitions Manual
1.0 1.1.22 Ensure sticky bit is set on all world-writable directories Pass
1.0 1.1.23 Disable Automounting Pass
1.0 1.1.24 Disable USB Storage Fail
1.2 Configure Software Updates


1.2.1 Ensure package manager repositories are configured Manual


1.2.2 Ensure GPG keys are configured Manual
1.3 Filesystem Integrity Checking
1.0 1.3.1 Ensure AIDE is installed Fail
1.0 1.3.2 Ensure filesystem integrity is regularly checked Fail
1.4 Secure Boot Settings
1.0 1.4.1 Ensure permissions on bootloader config are not overridden Fail
1.0 1.4.2 Ensure bootloader password is set Fail
1.0 1.4.3 Ensure permissions on bootloader config are configured Fail
1.0 1.4.4 Ensure authentication required for single user mode Pass
1.5 Additional Process Hardening


1.5.1 Ensure XD/NX support is enabled Manual
1.0 1.5.2 Ensure address space layout randomization (ASLR) is enabled Pass
1.0 1.5.3 Ensure prelink is disabled Pass
1.0 1.5.4 Ensure core dumps are restricted Fail
1.6 Mandatory Access Control
1.6.1 Configure AppArmor
1.0 1.6.1.1 Ensure AppArmor is installed Pass
1.0 1.6.1.2 Ensure AppArmor is enabled in the bootloader configuration Fail
1.0 1.6.1.3 Ensure all AppArmor Profiles are in enforce or complain mode Fail
1.7 Command Line Warning Banners
1.0 1.7.1 Ensure message of the day is configured properly Pass
1.0 1.7.2 Ensure permissions on /etc/issue.net are configured Pass
1.0 1.7.3 Ensure permissions on /etc/issue are configured Pass
1.0 1.7.4 Ensure permissions on /etc/motd are configured Pass
1.0 1.7.5 Ensure remote login warning banner is configured properly Fail
1.0 1.7.6 Ensure local login warning banner is configured properly Fail
1.8 GNOME Display Manager
1.0 1.8.2 Ensure GDM login banner is configured Pass
1.0 1.8.3 Ensure disable-user-list is enabled Pass
1.0 1.8.4 Ensure XDCMP is not enabled Pass


1.9 Ensure updates, patches, and additional security software are installed Manual
2 Services
2.1 Special Purpose Services
2.1.1 Time Synchronization
1.0 2.1.1.1 Ensure time synchronization is in use Pass


2.1.1.2 Ensure systemd-timesyncd is configured Manual
1.0 2.1.1.3 Ensure chrony is configured Pass
1.0 2.1.1.4 Ensure ntp is configured Pass
1.0 2.1.2 Ensure X Window System is not installed Pass
1.0 2.1.3 Ensure Avahi Server is not installed Pass
1.0 2.1.4 Ensure CUPS is not installed Pass
1.0 2.1.5 Ensure DHCP Server is not installed Pass
1.0 2.1.6 Ensure LDAP server is not installed Pass
1.0 2.1.7 Ensure NFS is not installed Pass
1.0 2.1.8 Ensure DNS Server is not installed Pass
1.0 2.1.9 Ensure FTP Server is not installed Pass
1.0 2.1.10 Ensure HTTP server is not installed Fail
1.0 2.1.11 Ensure IMAP and POP3 server are not installed Pass
1.0 2.1.12 Ensure Samba is not installed Pass
1.0 2.1.13 Ensure HTTP Proxy Server is not installed Pass
1.0 2.1.14 Ensure SNMP Server is not installed Pass
1.0 2.1.15 Ensure mail transfer agent is configured for local-only mode Pass
1.0 2.1.16 Ensure rsync service is not installed Pass
1.0 2.1.17 Ensure NIS Server is not installed Pass
2.2 Service Clients
1.0 2.2.1 Ensure NIS Client is not installed Pass
1.0 2.2.2 Ensure rsh client is not installed Pass
1.0 2.2.3 Ensure talk client is not installed Pass
1.0 2.2.4 Ensure telnet client is not installed Fail
1.0 2.2.5 Ensure LDAP client is not installed Pass
1.0 2.2.6 Ensure RPC is not installed Pass


2.3 Ensure nonessential services are removed or masked Manual
3 Network Configuration
3.1 Disable unused network protocols and devices
1.0 3.1.2 Ensure wireless interfaces are disabled Pass
3.2 Network Parameters (Host Only)
1.0 3.2.1 Ensure packet redirect sending is disabled Fail
1.0 3.2.2 Ensure IP forwarding is disabled Fail
3.3 Network Parameters (Host and Router)
1.0 3.3.1 Ensure source routed packets are not accepted Fail
1.0 3.3.2 Ensure ICMP redirects are not accepted Fail
1.0 3.3.3 Ensure secure ICMP redirects are not accepted Fail
1.0 3.3.4 Ensure suspicious packets are logged Fail
1.0 3.3.5 Ensure broadcast ICMP requests are ignored Fail
1.0 3.3.6 Ensure bogus ICMP responses are ignored Fail
1.0 3.3.7 Ensure Reverse Path Filtering is enabled Fail
1.0 3.3.8 Ensure TCP SYN Cookies is enabled Pass
1.0 3.3.9 Ensure IPv6 router advertisements are not accepted Fail
3.4 Uncommon Network Protocols
3.5 Firewall Configuration
3.5.1 Configure UncomplicatedFirewall
1.0 3.5.1.1 Ensure ufw is installed Fail
1.0 3.5.1.2 Ensure iptables-persistent is not installed with ufw Pass
1.0 3.5.1.3 Ensure ufw service is enabled Fail
1.0 3.5.1.4 Ensure ufw loopback traffic is configured Fail


3.5.1.5 Ensure ufw outbound connections are configured Manual


3.5.1.6 Ensure ufw firewall rules exist for all open ports Manual
1.0 3.5.1.7 Ensure ufw default deny firewall policy Fail
3.5.2 Configure nftables
1.0 3.5.2.1 Ensure nftables is installed Fail
1.0 3.5.2.2 Ensure ufw is uninstalled or disabled with nftables Pass


3.5.2.3 Ensure iptables are flushed with nftables Manual
1.0 3.5.2.4 Ensure a nftables table exists Fail
1.0 3.5.2.5 Ensure nftables base chains exist Fail
1.0 3.5.2.6 Ensure nftables loopback traffic is configured Fail


3.5.2.7 Ensure nftables outbound and established connections are configured Manual
1.0 3.5.2.8 Ensure nftables default deny firewall policy Fail
1.0 3.5.2.9 Ensure nftables service is enabled Fail
1.0 3.5.2.10 Ensure nftables rules are permanent Fail
3.5.3 Configure iptables
3.5.3.1 Configure iptables software
1.0 3.5.3.1.1 Ensure iptables packages are installed Fail
1.0 3.5.3.1.2 Ensure nftables is not installed with iptables Pass
1.0 3.5.3.1.3 Ensure ufw is uninstalled or disabled with iptables Pass
3.5.3.2 Configure IPv4 iptables
1.0 3.5.3.2.1 Ensure iptables default deny firewall policy Fail
1.0 3.5.3.2.2 Ensure iptables loopback traffic is configured Fail


3.5.3.2.3 Ensure iptables outbound and established connections are configured Manual
1.0 3.5.3.2.4 Ensure iptables firewall rules exist for all open ports Fail
3.5.3.3 Configure IPv6 ip6tables
1.0 3.5.3.3.1 Ensure ip6tables default deny firewall policy Fail
1.0 3.5.3.3.2 Ensure ip6tables loopback traffic is configured Pass


3.5.3.3.3 Ensure ip6tables outbound and established connections are configured Manual
1.0 3.5.3.3.4 Ensure ip6tables firewall rules exist for all open ports Fail
4 Logging and Auditing
4.1 Configure System Accounting (auditd)
4.1.1 Ensure auditing is enabled
4.1.2 Configure Data Retention
4.2 Configure Logging
4.2.1 Configure rsyslog
1.0 4.2.1.1 Ensure rsyslog is installed Fail
1.0 4.2.1.2 Ensure rsyslog Service is enabled Fail


4.2.1.3 Ensure logging is configured Manual
1.0 4.2.1.4 Ensure rsyslog default file permissions configured Fail
1.0 4.2.1.5 Ensure rsyslog is configured to send logs to a remote log host Fail


4.2.1.6 Ensure remote rsyslog messages are only accepted on designated log hosts. Manual
4.2.2 Configure journald
1.0 4.2.2.1 Ensure journald is configured to send logs to rsyslog Fail
1.0 4.2.2.2 Ensure journald is configured to compress large log files Fail
1.0 4.2.2.3 Ensure journald is configured to write logfiles to persistent disk Fail
1.0 4.2.3 Ensure permissions on all logfiles are configured Fail


4.3 Ensure logrotate is configured Manual
1.0 4.4 Ensure logrotate assigns appropriate permissions Pass
5 Access, Authentication and Authorization
5.1 Configure time-based job schedulers
1.0 5.1.1 Ensure cron daemon is enabled and running Fail
1.0 5.1.2 Ensure permissions on /etc/crontab are configured Fail
1.0 5.1.3 Ensure permissions on /etc/cron.hourly are configured Fail
1.0 5.1.4 Ensure permissions on /etc/cron.daily are configured Fail
1.0 5.1.5 Ensure permissions on /etc/cron.weekly are configured Fail
1.0 5.1.6 Ensure permissions on /etc/cron.monthly are configured Fail
1.0 5.1.7 Ensure permissions on /etc/cron.d are configured Fail
1.0 5.1.8 Ensure cron is restricted to authorized users Fail
1.0 5.1.9 Ensure at is restricted to authorized users Pass
5.2 Configure sudo
1.0 5.2.1 Ensure sudo is installed Pass
1.0 5.2.2 Ensure sudo commands use pty Fail
1.0 5.2.3 Ensure sudo log file exists Fail
5.3 Configure SSH Server
1.0 5.3.1 Ensure permissions on /etc/ssh/sshd_config are configured Fail
1.0 5.3.2 Ensure permissions on SSH private host key files are configured Pass
1.0 5.3.3 Ensure permissions on SSH public host key files are configured Pass
1.0 5.3.4 Ensure SSH access is limited Fail
1.0 5.3.5 Ensure SSH LogLevel is appropriate Pass
1.0 5.3.7 Ensure SSH MaxAuthTries is set to 4 or less Fail
1.0 5.3.8 Ensure SSH IgnoreRhosts is enabled Pass
1.0 5.3.9 Ensure SSH HostbasedAuthentication is disabled Pass
1.0 5.3.10 Ensure SSH root login is disabled Fail
1.0 5.3.11 Ensure SSH PermitEmptyPasswords is disabled Pass
1.0 5.3.12 Ensure SSH PermitUserEnvironment is disabled Pass
1.0 5.3.13 Ensure only strong Ciphers are used Pass
1.0 5.3.14 Ensure only strong MAC algorithms are used Fail
1.0 5.3.15 Ensure only strong Key Exchange algorithms are used Fail
1.0 5.3.16 Ensure SSH Idle Timeout Interval is configured Fail
1.0 5.3.17 Ensure SSH LoginGraceTime is set to one minute or less Fail
1.0 5.3.18 Ensure SSH warning banner is configured Fail
1.0 5.3.19 Ensure SSH PAM is enabled Pass
1.0 5.3.21 Ensure SSH MaxStartups is configured Fail
1.0 5.3.22 Ensure SSH MaxSessions is limited Pass
5.4 Configure PAM
1.0 5.4.1 Ensure password creation requirements are configured Fail
1.0 5.4.2 Ensure lockout for failed password attempts is configured Fail
1.0 5.4.3 Ensure password reuse is limited Fail
1.0 5.4.4 Ensure password hashing algorithm is SHA-512 Pass
5.5 User Accounts and Environment
5.5.1 Set Shadow Password Suite Parameters
1.0 5.5.1.1 Ensure minimum days between password changes is configured Fail
1.0 5.5.1.2 Ensure password expiration is 365 days or less Fail
1.0 5.5.1.3 Ensure password expiration warning days is 7 or more Pass
1.0 5.5.1.4 Ensure inactive password lock is 30 days or less Fail
1.0 5.5.1.5 Ensure all users last password change date is in the past Pass
1.0 5.5.2 Ensure system accounts are secured Pass
1.0 5.5.3 Ensure default group for the root account is GID 0 Pass
1.0 5.5.4 Ensure default user umask is 027 or more restrictive Fail
1.0 5.5.5 Ensure default user shell timeout is 900 seconds or less Fail


5.6 Ensure root login is restricted to system console Manual
1.0 5.7 Ensure access to the su command is restricted Fail
6 System Maintenance
6.1 System File Permissions
1.0 6.1.2 Ensure permissions on /etc/passwd are configured Pass
1.0 6.1.3 Ensure permissions on /etc/passwd- are configured Pass
1.0 6.1.4 Ensure permissions on /etc/group are configured Pass
1.0 6.1.5 Ensure permissions on /etc/group- are configured Pass
1.0 6.1.6 Ensure permissions on /etc/shadow are configured Pass
1.0 6.1.7 Ensure permissions on /etc/shadow- are configured Pass
1.0 6.1.8 Ensure permissions on /etc/gshadow are configured Pass
1.0 6.1.9 Ensure permissions on /etc/gshadow- are configured Pass
1.0 6.1.10 Ensure no world writable files exist Fail
1.0 6.1.11 Ensure no unowned files or directories exist Pass
1.0 6.1.12 Ensure no ungrouped files or directories exist Pass


6.1.13 Audit SUID executables Manual


6.1.14 Audit SGID executables Manual
6.2 User and Group Settings
1.0 6.2.1 Ensure accounts in /etc/passwd use shadowed passwords Pass
1.0 6.2.2 Ensure password fields are not empty Pass
1.0 6.2.3 Ensure all groups in /etc/passwd exist in /etc/group Pass
1.0 6.2.4 Ensure all users' home directories exist Fail
1.0 6.2.5 Ensure users own their home directories Pass
1.0 6.2.6 Ensure users' home directories permissions are 750 or more restrictive Fail
1.0 6.2.7 Ensure users' dot files are not group or world writable Pass
1.0 6.2.8 Ensure no users have .netrc files Pass
1.0 6.2.9 Ensure no users have .forward files Pass
1.0 6.2.10 Ensure no users have .rhosts files Pass
1.0 6.2.11 Ensure root is the only UID 0 account Pass
1.0 6.2.12 Ensure root PATH Integrity Pass
1.0 6.2.13 Ensure no duplicate UIDs exist Pass
1.0 6.2.14 Ensure no duplicate GIDs exist Pass
1.0 6.2.15 Ensure no duplicate user names exist Pass
1.0 6.2.16 Ensure no duplicate group names exist Pass
1.0 6.2.17 Ensure shadow group is empty Pass

Assessment Details

1 Initial Setup

Items in this section are advised for all systems, but may be difficult or require extensive preparation after the initial setup of the system.

1.1 Filesystem Configuration

Directories that are used for system-wide functions can be further protected by placing them on separate partitions. This provides protection for resource exhaustion and enables the use of mounting options that are applicable to the directory's intended use. Users' data can be stored on separate partitions and have stricter mount options. A user partition is a filesystem that has been established for use by the users and does not contain software for system operations.

The recommendations in this section are easier to perform during initial system installation. If the system is already installed, it is recommended that a full backup be performed before repartitioning the system.

Note: If you are repartitioning a system that has already been installed, make sure the data has been copied over to the new partition, unmount it and then remove the data from the directory that was in the old partition. Otherwise it will still consume space in the old partition that will be masked when the new filesystem is mounted. For example, if a system is in single-user mode with no filesystems mounted and the administrator adds a lot of data to the /tmp directory, this data will still consume space in / once the /tmp filesystem is mounted unless it is removed first.

1.1.1 Disable unused filesystems

A number of uncommon filesystem types are supported under Linux. Removing support for unneeded filesystem types reduces the local attack surface of the system. If a filesystem type is not needed it should be disabled. Native Linux file systems are designed to ensure that built-in security controls function as expected. Non-native filesystems can lead to unexpected consequences to both the security and functionality of the system and should be used with caution. Many filesystems are created for niche use cases and are not maintained and supported as the operating systems are updated and patched. Users of non-native filesystems should ensure that there is attention and ongoing support for them, especially in light of frequent operating system changes.

Standard network connectivity and Internet access to cloud storage may make the use of non-standard filesystem formats to directly attach heterogeneous devices much less attractive.

Note: This should not be considered a comprehensive list of filesystems. You may wish to consider additions to those listed here for your environment.

Fail

1.1.1.1 Ensure mounting of cramfs filesystems is disabled

Description:

The cramfs filesystem type is a compressed read-only Linux filesystem embedded in small footprint systems. A cramfs image can be used without having to first decompress the image.

Removing support for unneeded filesystem types reduces the local attack surface of the server. If this filesystem type is not needed, disable it.

Edit or create a file in the /etc/modprobe.d/ directory ending in .conf

Example: vim /etc/modprobe.d/cramfs.conf

and add the following line:

install cramfs /bin/true

Run the following command to unload the cramfs module:

# rmmod cramfs

Show Assessment Evidence
Complex Check
AND
Criterion: Ensure kernel module cramfs is not loadable
Existence Check: At Least One Exists
Item Check: At least one
Result: Fail
Shellcommand Item
Name Type Status Value
Command String Exists modprobe -n -v cramfs
Line Selection String Exists .+
Exit Status Int Exists 0
Stdout Line String Exists insmod /lib/modules/5.4.0-1057-gcp/kernel/drivers/mtd/mtd.ko
Stdout Line String Exists insmod /lib/modules/5.4.0-1057-gcp/kernel/fs/cramfs/cramfs.ko
Criterion: Ensure kernel module cramfs is not loaded
Existence Check: At Least One Exists
Item Check: None satisfy
Result: Pass
Shellcommand Item
Name Type Status Value
Command String Exists modprobe -n -v cramfs
Line Selection String Exists .+
Exit Status Int Exists 0
Stdout Line String Exists insmod /lib/modules/5.4.0-1057-gcp/kernel/drivers/mtd/mtd.ko
Stdout Line String Exists insmod /lib/modules/5.4.0-1057-gcp/kernel/fs/cramfs/cramfs.ko


Show Rule Result XML

References:

    CIS Controls V7.0:

    • Control 5: Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers: -- More

    Fail

    1.1.1.2 Ensure mounting of freevxfs filesystems is disabled

    Description:

    The freevxfs filesystem type is a free version of the Veritas type filesystem. This is the primary filesystem type for HP-UX operating systems.

    Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.

    Edit or create a file in the /etc/modprobe.d/ directory ending in .conf

    Example: vi /etc/modprobe.d/freevxfs.conf

    and add the following line:

    install freevxfs /bin/true

    Run the following command to unload the freevxfs module:

    rmmod freevxfs

    Show Assessment Evidence
    Complex Check
    AND
    Criterion: Ensure kernel module freevxfs is not loadable
    Existence Check: At Least One Exists
    Item Check: At least one
    Result: Fail
    Shellcommand Item
    Name Type Status Value
    Command String Exists modprobe -n -v freevxfs
    Line Selection String Exists .+
    Exit Status Int Exists 0
    Stdout Line String Exists insmod /lib/modules/5.4.0-1057-gcp/kernel/fs/freevxfs/freevxfs.ko
    Criterion: Ensure kernel module freevxfs is not loaded
    Existence Check: At Least One Exists
    Item Check: None satisfy
    Result: Pass
    Shellcommand Item
    Name Type Status Value
    Command String Exists modprobe -n -v freevxfs
    Line Selection String Exists .+
    Exit Status Int Exists 0
    Stdout Line String Exists insmod /lib/modules/5.4.0-1057-gcp/kernel/fs/freevxfs/freevxfs.ko


    Show Rule Result XML

    References:

      CIS Controls V7.0:

      • Control 5: Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers: -- More

      Fail

      1.1.1.3 Ensure mounting of jffs2 filesystems is disabled

      Description:

      The jffs2 (journaling flash filesystem 2) filesystem type is a log-structured filesystem used in flash memory devices.

      Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.

      Edit or create a file in the /etc/modprobe.d/ directory ending in .conf

      Example: vi /etc/modprobe.d/jffs2.conf

      and add the following line:

      install jffs2 /bin/true

      Run the following command to unload the jffs2 module:

      # rmmod jffs2

      Show Assessment Evidence
      Complex Check
      AND
      Criterion: Ensure kernel module jffs2 is not loadable
      Existence Check: At Least One Exists
      Item Check: At least one
      Result: Fail
      Shellcommand Item
      Name Type Status Value
      Command String Exists modprobe -n -v jffs2
      Line Selection String Exists .+
      Exit Status Int Exists 0
      Stdout Line String Exists insmod /lib/modules/5.4.0-1057-gcp/kernel/drivers/mtd/mtd.ko
      Stdout Line String Exists insmod /lib/modules/5.4.0-1057-gcp/kernel/fs/jffs2/jffs2.ko
      Criterion: Ensure kernel module jffs2 is not loaded
      Existence Check: At Least One Exists
      Item Check: None satisfy
      Result: Pass
      Shellcommand Item
      Name Type Status Value
      Command String Exists modprobe -n -v jffs2
      Line Selection String Exists .+
      Exit Status Int Exists 0
      Stdout Line String Exists insmod /lib/modules/5.4.0-1057-gcp/kernel/drivers/mtd/mtd.ko
      Stdout Line String Exists insmod /lib/modules/5.4.0-1057-gcp/kernel/fs/jffs2/jffs2.ko


      Show Rule Result XML

      References:

        CIS Controls V7.0:

        • Control 5: Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers: -- More

        Fail

        1.1.1.4 Ensure mounting of hfs filesystems is disabled

        Description:

        The hfs filesystem type is a hierarchical filesystem that allows you to mount Mac OS filesystems.

        Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.

        Edit or create a file in the /etc/modprobe.d/ directory ending in .conf

        Example: vi /etc/modprobe.d/hfs.conf

        and add the following line:

        install hfs /bin/true

        Run the following command to unload the hfs module:

        # rmmod hfs

        Show Assessment Evidence
        Complex Check
        AND
        Criterion: Ensure kernel module hfs is not loadable
        Existence Check: At Least One Exists
        Item Check: At least one
        Result: Fail
        Shellcommand Item
        Name Type Status Value
        Command String Exists modprobe -n -v hfs
        Line Selection String Exists .+
        Exit Status Int Exists 0
        Stdout Line String Exists insmod /lib/modules/5.4.0-1057-gcp/kernel/fs/hfs/hfs.ko
        Criterion: Ensure kernel module hfs is not loaded
        Existence Check: At Least One Exists
        Item Check: None satisfy
        Result: Pass
        Shellcommand Item
        Name Type Status Value
        Command String Exists modprobe -n -v hfs
        Line Selection String Exists .+
        Exit Status Int Exists 0
        Stdout Line String Exists insmod /lib/modules/5.4.0-1057-gcp/kernel/fs/hfs/hfs.ko


        Show Rule Result XML

        References:

          CIS Controls V7.0:

          • Control 5: Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers: -- More

          Fail

          1.1.1.5 Ensure mounting of hfsplus filesystems is disabled

          Description:

          The hfsplus filesystem type is a hierarchical filesystem designed to replace hfs that allows you to mount Mac OS filesystems.

          Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.

          Edit or create a file in the /etc/modprobe.d/ directory ending in .conf

          Example: vi /etc/modprobe.d/hfsplus.conf

          and add the following line:

          install hfsplus /bin/true

          Run the following command to unload the hfsplus module:

          # rmmod hfsplus

          Show Assessment Evidence
          Complex Check
          AND
          Criterion: Ensure kernel module hfsplus is not loaded
          Existence Check: At Least One Exists
          Item Check: None satisfy
          Result: Pass
          Shellcommand Item
          Name Type Status Value
          Command String Exists modprobe -n -v hfsplus
          Line Selection String Exists .+
          Exit Status Int Exists 0
          Stdout Line String Exists insmod /lib/modules/5.4.0-1057-gcp/kernel/fs/hfsplus/hfsplus.ko
          Criterion: Ensure kernel module hfsplus is not loadable
          Existence Check: At Least One Exists
          Item Check: At least one
          Result: Fail
          Shellcommand Item
          Name Type Status Value
          Command String Exists modprobe -n -v hfsplus
          Line Selection String Exists .+
          Exit Status Int Exists 0
          Stdout Line String Exists insmod /lib/modules/5.4.0-1057-gcp/kernel/fs/hfsplus/hfsplus.ko


          Show Rule Result XML

          References:

            CIS Controls V7.0:

            • Control 5: Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers: -- More

            Fail

            1.1.1.6 Ensure mounting of udf filesystems is disabled

            Description:

            The udf filesystem type is the universal disk format used to implement ISO/IEC 13346 and ECMA-167 specifications. This is an open vendor filesystem type for data storage on a broad range of media. This filesystem type is necessary to support writing DVDs and newer optical disc formats.

            Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.

            Edit or create a file in the /etc/modprobe.d/ directory ending in .conf

            Example: vi /etc/modprobe.d/udf.conf

            and add the following line:

            install udf /bin/true

            Run the following command to unload the udf module:

            # rmmod udf

            Show Assessment Evidence
            Complex Check
            AND
            Criterion: Ensure kernel module udf is not loadable
            Existence Check: At Least One Exists
            Item Check: At least one
            Result: Fail
            Shellcommand Item
            Name Type Status Value
            Command String Exists modprobe -n -v udf
            Line Selection String Exists .+
            Exit Status Int Exists 0
            Stdout Line String Exists insmod /lib/modules/5.4.0-1057-gcp/kernel/lib/crc-itu-t.ko
            Stdout Line String Exists insmod /lib/modules/5.4.0-1057-gcp/kernel/fs/udf/udf.ko
            Criterion: Ensure kernel module udf is not loaded
            Existence Check: At Least One Exists
            Item Check: None satisfy
            Result: Pass
            Shellcommand Item
            Name Type Status Value
            Command String Exists modprobe -n -v udf
            Line Selection String Exists .+
            Exit Status Int Exists 0
            Stdout Line String Exists insmod /lib/modules/5.4.0-1057-gcp/kernel/lib/crc-itu-t.ko
            Stdout Line String Exists insmod /lib/modules/5.4.0-1057-gcp/kernel/fs/udf/udf.ko


            Show Rule Result XML

            References:

              CIS Controls V7.0:

              • Control 5: Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers: -- More

              Fail

              1.1.2 Ensure /tmp is configured

              Description:

              The /tmp directory is a world-writable directory used for temporary storage by all users and some applications

              Making /tmp its own file system allows an administrator to set the noexec option on the mount, making /tmp useless for an attacker to install executable code. It would also prevent an attacker from establishing a hardlink to a system setuid program and wait for it to be updated. Once the program was updated, the hardlink would be broken and the attacker would have his own copy of the program. If the program happened to have a security vulnerability, the attacker could continue to exploit the known flaw.

              This can be accomplished by either mounting tmpfs to /tmp, or creating a separate partition for /tmp.

              Configure /etc/fstab as appropriate.

              Example:

              tmpfs /tmp tmpfs defaults,rw,nosuid,nodev,noexec,relatime 0 0

              OR Run the following commands to enable systemd /tmp mounting:

              Run the following command to create the tmp.mount file is the correct location:

              # cp -v /usr/share/systemd/tmp.mount /etc/systemd/system/

              Edit /etc/systemd/system/tmp.mount to configure the /tmp mount:

              [Mount]

              What=tmpfs

              Where=/tmp

              Type=tmpfs

              Options=mode=1777,strictatime,nosuid,nodev,noexec

              Run the following command to reload the systemd daemon with the unpdated tmp.mount unit file:

              # systemctl daemon-reload

              Run the following command to enable and start tmp.mount

              # systemctl --now enable tmp.mount

              Impact:

              Since the /tmp directory is intended to be world-writable, there is a risk of resource exhaustion if it is not bound to a separate partition.

              Running out of /tmp space is a problem regardless of what kind of filesystem lies under it, but in a default installation a disk-based /tmp will essentially have the whole disk available, as it only creates a single / partition. On the other hand, a RAM-based /tmp as with tmpfs will almost certainly be much smaller, which can lead to applications filling up the filesystem much more easily.

              /tmp utilizing tmpfs can be resized using the size={size} parameter on the Options line on the tmp.mount file

              Show Assessment Evidence
              Complex Check
              AND
              Criterion: Ensure partition at /tmp and all
              Existence Check: At Least One Exists
              Item Check: All
              Result: Fail
              No matching system items were found.


              Show Rule Result XML

              References:

              • URL: AJ Lewis, "LVM HOWTO", http://tldp.org/HOWTO/LVM-HOWTO/
              • URL: https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems/

              CIS Controls V7.0:

              • Control 5: Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers: -- More

              Fail

              1.1.3 Ensure nodev option set on /tmp partition

              Description:

              The nodev mount option specifies that the filesystem cannot contain special devices.

              Since the /tmp filesystem is not intended to support devices, set this option to ensure that users cannot attempt to create block or character special devices in /tmp .

              Edit the /etc/fstab file OR the /etc/systemd/system/local-fs.target.wants/tmp.mount file:

              If /etc/fstab is used to mount /tmp :

              Edit the /etc/fstab file and add nodev to the fourth field (mounting options) for the /tmp partition. See the fstab(5) manual page for more information.

              Run the following command to remount /tmp :

              # mount -o remount,nodev /tmp

              OR If systemd is used to mount /tmp :

              Edit /etc/systemd/system/local-fs.target.wants/tmp.mount to add nodev to the /tmp mount options:

              [Mount]

              Options=mode=1777,strictatime,noexec,nodev,nosuid

              Run the following command to restart the systemd daemon:

              # systemctl daemon-reload

              Run the following command to restart tmp.mount

              # systemctl restart tmp.mount

              Show Assessment Evidence
              Complex Check
              AND
              Criterion: Ensure partition at /tmp and all
              Existence Check: At Least One Exists
              Item Check: All
              Result: Fail
              No matching system items were found.


              Show Rule Result XML

              References:

                CIS Controls V7.0:

                • Control 5: Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers: -- More

                Fail

                1.1.24 Disable USB Storage

                Description:

                USB storage provides a means to transfer and store files insuring persistence and availability of the files independent of network connection status. Its popularity and utility has led to USB-based malware being a simple and common means for network infiltration and a first step to establishing a persistent threat within a networked environment.

                Note: An alternative solution to disabling the usb-storage module may be found in USBGuard. Use of USBGuard and construction of USB device policies should be done in alignment with site policy.

                Restricting USB access on the system will decrease the physical attack surface for a device and diminish the possible vectors to introduce malware.

                Edit or create a file in the /etc/modprobe.d/ directory ending in .conf

                Example: vi /etc/modprobe.d/usb_storage.conf and add the following line:

                install usb-storage /bin/true

                Run the following command to unload the usb-storage module:

                rmmod usb-storage

                Show Assessment Evidence
                Complex Check
                AND
                Criterion: Ensure kernel module usb-storage is not loaded
                Existence Check: At Least One Exists
                Item Check: None satisfy
                Result: Pass
                Shellcommand Item
                Name Type Status Value
                Command String Exists modprobe -n -v usb-storage
                Line Selection String Exists .+
                Exit Status Int Exists 0
                Stdout Line String Exists insmod /lib/modules/5.4.0-1057-gcp/kernel/drivers/usb/storage/usb-storage.ko
                Criterion: Ensure kernel module usb-storage is not loadable
                Existence Check: At Least One Exists
                Item Check: At least one
                Result: Fail
                Shellcommand Item
                Name Type Status Value
                Command String Exists modprobe -n -v usb-storage
                Line Selection String Exists .+
                Exit Status Int Exists 0
                Stdout Line String Exists insmod /lib/modules/5.4.0-1057-gcp/kernel/drivers/usb/storage/usb-storage.ko


                Show Rule Result XML

                References:

                  CIS Controls V7.0:

                  • Control 8: Malware Defenses: -- More
                  • Control 8: Malware Defenses: -- More

                  1.2 Configure Software Updates

                  Debian Family Linux distributions use apt to install and update software packages. Patch management procedures may vary widely between enterprises. Large enterprises may choose to install a local updates server that can be used in place of their distributions servers, whereas a single deployment of a system may prefer to get updates directly. Updates can be performed automatically or manually, depending on the site's policy for patch management. Many large enterprises prefer to test patches on a non-production system before rolling out to production.

                  For the purpose of this benchmark, the requirement is to ensure that a patch management system is configured and maintained. The specifics on patch update procedures are left to the organization.

                  1.3 Filesystem Integrity Checking

                  AIDE is a file integrity checking tool, similar in nature to Tripwire. While it cannot prevent intrusions, it can detect unauthorized changes to configuration files by alerting when the files are changed. When setting up AIDE, decide internally what the site policy will be concerning integrity checking. Review the AIDE quick start guide and AIDE documentation before proceeding.

                  Fail

                  1.3.1 Ensure AIDE is installed

                  Description:

                  AIDE takes a snapshot of filesystem state including modification times, permissions, and file hashes which can then be used to compare against the current state of the filesystem to detect modifications to the system.

                  By monitoring the filesystem state compromised files can be detected to prevent or limit the exposure of accidental or malicious misconfigurations or modified binaries.

                  Install AIDE using the appropriate package manager or manual installation:

                  # apt install aide aide-common

                  Configure AIDE as appropriate for your environment. Consult the AIDE documentation for options.

                  Run the following commands to initialize AIDE:

                  # aideinit

                  # mv /var/lib/aide/aide.db.new /var/lib/aide/aide.db

                  Show Assessment Evidence
                  Complex Check
                  AND
                  Criterion: Ensure package name equals 'aide' is installed
                  Existence Check: At Least One Exists
                  Item Check: All
                  Result: Fail
                  No matching system items were found.
                  Criterion: Ensure package name equals 'aide-common' is installed
                  Existence Check: At Least One Exists
                  Item Check: All
                  Result: Fail
                  No matching system items were found.


                  Show Rule Result XML

                  References:

                    CIS Controls V7.0:

                    • Control 14: Controlled Access Based on the Need to Know: -- More

                    Fail

                    1.3.2 Ensure filesystem integrity is regularly checked

                    Description:

                    Periodic checking of the filesystem integrity is needed to detect changes to the filesystem.

                    Periodic file checking allows the system administrator to determine on a regular basis if critical files have been changed in an unauthorized fashion.

                    If cron will be used to schedule and run aide check:

                    Run the following command:

                    # crontab -u root -e

                    Add the following line to the crontab:

                    0 5 * * * /usr/bin/aide.wrapper --config /etc/aide/aide.conf --check

                    OR If aidecheck.service and aidecheck.timer will be used to schedule and run aide check:

                    Create or edit the file /etc/systemd/system/aidecheck.service and add the following lines:

                    [Unit]

                    Description=Aide Check



                    [Service]

                    Type=simple

                    ExecStart=/usr/bin/aide.wrapper --config /etc/aide/aide.conf --check



                    [Install]

                    WantedBy=multi-user.target

                    Create or edit the file /etc/systemd/system/aidecheck.timer and add the following lines:

                    [Unit]

                    Description=Aide check every day at 5AM



                    [Timer]

                    OnCalendar=*-*-* 05:00:00

                    Unit=aidecheck.service



                    [Install]

                    WantedBy=multi-user.target

                    Run the following commands:

                    # chown root:root /etc/systemd/system/aidecheck.*

                    # chmod 0644 /etc/systemd/system/aidecheck.*



                    # systemctl daemon-reload



                    # systemctl enable aidecheck.service

                    # systemctl --now enable aidecheck.timer

                    Show Assessment Evidence
                    Complex Check
                    OR
                    Complex Check
                    OR
                    Complex Check
                    OR
                    Complex Check
                    OR
                    Complex Check
                    OR
                    Complex Check
                    OR
                    Complex Check
                    OR
                    Complex Check
                    OR
                    Criterion: Ensure at least one file(s) named ^.+$ in /var/spool/cron/ exists and matches pattern ^([-0-9*\/,A-Za-z]+\s+){5}([^#]+\s+)?\/usr\/bin\/aide\.wrapper\s--config\s+\/etc\/aide\/aide\.conf\s--check\b
                    Existence Check: At Least One Exists
                    Item Check: All
                    Result: Fail
                    No matching system items were found.
                    Criterion: Ensure at least one file named /etc/crontab exists and matches pattern ^([-0-9*\/,A-Za-z]+\s+){5}([^#]+\s+)?\/usr\/bin\/aide\.wrapper\s--config\s+\/etc\/aide\/aide\.conf\s--check\b
                    Existence Check: At Least One Exists
                    Item Check: All
                    Result: Fail
                    No matching system items were found.
                    Criterion: Ensure at least one file(s) named ^.+$ in /etc/cron.d exists and matches pattern ^([-0-9*\/,A-Za-z]+\s+){5}([^#]+\s+)?\/usr\/bin\/aide\.wrapper\s--config\s+\/etc\/aide\/aide\.conf\s--check\b
                    Existence Check: At Least One Exists
                    Item Check: All
                    Result: Fail
                    No matching system items were found.
                    Criterion: Ensure at least one file(s) named ^.+$ in /etc/cron.hourly exists and matches pattern ^\s*([^#]+\s+)?\/usr\/bin\/aide\.wrapper\s--config\s+\/etc\/aide\/aide\.conf\s--check\b
                    Existence Check: At Least One Exists
                    Item Check: All
                    Result: Fail
                    No matching system items were found.
                    Criterion: Ensure at least one file(s) named ^.+$ in /etc/cron.daily exists and matches pattern ^\s*([^#]+\s+)?\/usr\/bin\/aide\.wrapper\s--config\s+\/etc\/aide\/aide\.conf\s--check\b
                    Existence Check: At Least One Exists
                    Item Check: All
                    Result: Fail
                    No matching system items were found.
                    Criterion: Ensure at least one file(s) named ^.+$ in /etc/cron.weekly exists and matches pattern ^\s*([^#]+\s+)?\/usr\/bin\/aide\.wrapper\s--config\s+\/etc\/aide\/aide\.conf\s--check\b
                    Existence Check: At Least One Exists
                    Item Check: All
                    Result: Fail
                    No matching system items were found.
                    Criterion: Ensure at least one file(s) named .* in /etc/cron.monthly exists and matches pattern ^\s*([^#]+\s+)?\/usr\/bin\/aide\.wrapper\s--config\s+\/etc\/aide\/aide\.conf\s--check\b
                    Existence Check: At Least One Exists
                    Item Check: All
                    Result: Fail
                    No matching system items were found.
                    Criterion: Ensure at least one file(s) named ^.+$ in /etc/cron.daily/ exists and matches pattern ^\s*aide.wrapper\s+\$AIDEARGS\s+\"--\$COMMAND\"\s*.*$
                    Existence Check: At Least One Exists
                    Item Check: All
                    Result: Fail
                    No matching system items were found.
                    Complex Check
                    AND
                    Complex Check
                    AND
                    Complex Check
                    AND
                    Criterion: Ensure standard service 'aidecheck.service' is enabled
                    Existence Check: At Least One Exists
                    Item Check: All
                    Result: Fail
                    Systemdunitproperty Item
                    Name Type Status Value
                    Unit String Exists aidecheck.service.service
                    Property String Exists UnitFileState
                    Value String Exists No Value
                    Criterion: Ensure standard service 'aidecheck.timer' is enabled
                    Existence Check: At Least One Exists
                    Item Check: All
                    Result: Fail
                    Systemdunitproperty Item
                    Name Type Status Value
                    Unit String Exists aidecheck.timer.service
                    Property String Exists UnitFileState
                    Value String Exists No Value
                    Criterion: Ensure at least one file(s) named aidecheck.timer in /etc/systemd/system/ exists and matches pattern ^\s*Unit=aidecheck\.service\b
                    Existence Check: At Least One Exists
                    Item Check: All
                    Result: Fail
                    No matching system items were found.
                    Criterion: Ensure at least one file(s) named aidecheck.service in /etc/systemd/system/ exists and matches pattern ^\s*ExecStart=([^#]+\s+)?\/usr\/bin\/aide\.wrapper\s--config\s\/etc\/aide\/aide\.conf\s--check\b
                    Existence Check: At Least One Exists
                    Item Check: All
                    Result: Fail
                    No matching system items were found.


                    Show Rule Result XML

                    References:

                    • URL: https://github.com/konstruktoid/hardening/blob/master/config/aidecheck.service
                    • URL: https://github.com/konstruktoid/hardening/blob/master/config/aidecheck.timer

                    CIS Controls V7.0:

                    • Control 14: Controlled Access Based on the Need to Know: -- More

                    1.4 Secure Boot Settings

                    The recommendations in this section focus on securing the bootloader and settings involved in the boot process directly.

                    Fail

                    1.4.1 Ensure permissions on bootloader config are not overridden

                    Description:

                    The permissions on /boot/grub/grub.cfg are changed to 444 when grub.cfg is updated by the update-grub command

                    Setting the permissions to read and write for root only prevents non-root users from seeing the boot parameters or changing them. Non-root users who read the boot parameters may be able to identify weaknesses in security upon boot and be able to exploit them.

                    Run the following command to update chmod 444 to chmod 400 in /usr/sbin/grub-mkconfig :

                    # sed -ri 's/chmod\s+[0-7][0-7][0-7]\s+\$\{grub_cfg\}\.new/chmod 400 ${grub_cfg}.new/' /usr/sbin/grub-mkconfig

                    Run the following command to remove check on password not being set to before running chmod command:

                    # sed -ri 's/ && ! grep "\^password" \$\{grub_cfg\}.new >\/dev\/null//' /usr/sbin/grub-mkconfig

                    Show Assessment Evidence
                    Complex Check
                    AND
                    Criterion: Ensure at least one file named /usr/sbin/grub-mkconfig exists and matches pattern ^\s*chmod\s+400\s+\$\{grub_cfg\}\.new\b
                    Existence Check: At Least One Exists
                    Item Check: All
                    Result: Fail
                    No matching system items were found.
                    Criterion: Ensure no file named /usr/sbin/grub-mkconfig exists and matches pattern ^\s*if\s+\[ "x\$\{grub_cfg\}" != "x" \]&! grep "\^password" \$\{grub_cfg\}\.new >\/dev\/null
                    Existence Check: None Exist
                    Item Check: All
                    Result: Pass
                    No matching system items were found.


                    Show Rule Result XML

                    References:

                      CIS Controls V7.0:

                      • Control 14: Controlled Access Based on the Need to Know: -- More

                      Fail

                      1.4.2 Ensure bootloader password is set

                      Description:

                      Setting the boot loader password will require that anyone rebooting the system must enter a password before being able to set command line boot parameters

                      Requiring a boot password upon execution of the boot loader will prevent an unauthorized user from entering boot parameters or changing the boot partition. This prevents users from weakening security (e.g. turning off AppArmor at boot time).

                      Create an encrypted password with grub-mkpasswd-pbkdf2 :

                      # grub-mkpasswd-pbkdf2



                      Enter password: <password>

                      Reenter password: <password>

                      PBKDF2 hash of your password is <encrypted-password>

                      Add the following into a custom /etc/grub.d configuration file:

                      cat <<EOF

                      set superusers="<username>"

                      password_pbkdf2 <username> <encrypted-password>

                      EOF

                      The superuser/user information and password should not be contained in the /etc/grub.d/00_header file as this file could be overwritten in a package update.

                      If there is a requirement to be able to boot/reboot without entering the password, edit /etc/grub.d/10_linux and add --unrestricted to the line CLASS=

                      Example:

                      CLASS="--class gnu-linux --class gnu --class os --unrestricted"

                      Run the following command to update the grub2 configuration:

                      # update-grub

                      Impact:

                      If password protection is enabled, only the designated superuser can edit a Grub 2 menu item by pressing "e" or access the GRUB 2 command line by pressing "c"

                      If GRUB 2 is set up to boot automatically to a password-protected menu entry the user has no option to back out of the password prompt to select another menu entry. Holding the SHIFT key will not display the menu in this case. The user must enter the correct username and password. If unable, the configuration files will have to be edited via the LiveCD or other means to fix the problem

                      You can add --unrestricted to the menu entries to allow the system to boot without entering a password. Password will still be required to edit menu items.

                      More Information: https://help.ubuntu.com/community/Grub2/Passwords

                      Show Assessment Evidence
                      Complex Check
                      AND
                      Criterion: Ensure at least one file named /boot/grub/grub.cfg exists and matches pattern ^\s*set\s+superusers\s*=\s*"[^"]*"\s*(\s+#.*)?$
                      Existence Check: At Least One Exists
                      Item Check: All
                      Result: Fail
                      No matching system items were found.
                      Criterion: Ensure at least one file named /boot/grub/grub.cfg exists and matches pattern ^\s*password_pbkdf2\s+\S+\s+\S+\s*(\s+#.*)?$
                      Existence Check: At Least One Exists
                      Item Check: All
                      Result: Fail
                      No matching system items were found.


                      Show Rule Result XML

                      References:

                        CIS Controls V7.0:

                        • Control 5: Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers: -- More

                        Fail

                        1.4.3 Ensure permissions on bootloader config are configured

                        Description:

                        The grub configuration file contains information on boot settings and passwords for unlocking boot options.

                        Setting the permissions to read and write for root only prevents non-root users from seeing the boot parameters or changing them. Non-root users who read the boot parameters may be able to identify weaknesses in security upon boot and be able to exploit them.

                        Run the following commands to set permissions on your grub configuration:

                        # chown root:root /boot/grub/grub.cfg

                        # chmod u-wx,go-rwx /boot/grub/grub.cfg

                        Show Assessment Evidence
                        Complex Check
                        AND
                        Criterion: Ensure at least one file named /boot/grub/grub.cfg exists and is owned by 0:0 and does not have permissions -wxrwxrwx
                        Existence Check: At Least One Exists
                        Item Check: All
                        Result: Fail
                        No matching system items were found.


                        Show Rule Result XML

                        References:

                          CIS Controls V7.0:

                          • Control 5: Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers: -- More

                          1.5 Additional Process Hardening

                          Fail

                          1.5.4 Ensure core dumps are restricted

                          Description:

                          A core dump is the memory of an executable program. It is generally used to determine why a program aborted. It can also be used to glean confidential information from a core file. The system provides the ability to set a soft limit for core dumps, but this can be overridden by the user.

                          Setting a hard limit on core dumps prevents users from overriding the soft variable. If core dumps are required, consider setting limits for user groups (see limits.conf(5) ). In addition, setting the fs.suid_dumpable variable to 0 will prevent setuid programs from dumping core.

                          Add the following line to /etc/security/limits.conf or a /etc/security/limits.d/* file:

                          * hard core 0

                          Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file:

                          fs.suid_dumpable = 0

                          Run the following command to set the active kernel parameter:

                          # sysctl -w fs.suid_dumpable=0

                          IF systemd-coredump is installed:

                          edit /etc/systemd/coredump.conf and add/modify the following lines:

                          Storage=none

                          ProcessSizeMax=0

                          Run the command:

                          systemctl daemon-reload

                          Show Assessment Evidence
                          Complex Check
                          AND
                          Complex Check
                          AND
                          Complex Check
                          OR
                          Criterion: Ensure at least one file named /etc/security/limits.conf exists and matches pattern ^\s*\*\s+hard\s+core\s+0\s*(\s+#.*)?$
                          Existence Check: At Least One Exists
                          Item Check: All
                          Result: Fail
                          No matching system items were found.
                          Criterion: Ensure at least one file(s) named ^.+$ in /etc/security/limits.d exists and matches pattern ^\s*\*\s+hard\s+core\s+0\s*(\s+#.*)?$
                          Existence Check: At Least One Exists
                          Item Check: All
                          Result: Fail
                          No matching system items were found.
                          Script: sce/sysctl_running_config.sh
                          Result: Fail
                          Exit Value: 102
                          Output:
                          • Missing sysctl parameter.
                          Errors:
                          • sysctl: permission denied on key 'fs.protected_fifos'
                          • sysctl: permission denied on key 'fs.protected_regular'
                          • sysctl: permission denied on key 'kernel.cad_pid'
                          • sysctl: permission denied on key 'kernel.unprivileged_userns_apparmor_policy'
                          • sysctl: reading key "net.ipv6.conf.default.stable_secret"
                          • sysctl: reading key "net.ipv6.conf.docker0.stable_secret"
                          • sysctl: reading key "net.ipv6.conf.eth0.stable_secret"
                          • sysctl: reading key "net.ipv6.conf.eth1.stable_secret"
                          • sysctl: reading key "net.ipv6.conf.flannel/1.stable_secret"
                          • sysctl: reading key "net.ipv6.conf.lo.stable_secret"
                          • sysctl: reading key "net.ipv6.conf.veth970eb406.stable_secret"
                          • sysctl: reading key "net.ipv6.conf.vethe2d33714.stable_secret"
                          • sysctl: permission denied on key 'vm.mmap_rnd_bits'
                          • sysctl: permission denied on key 'vm.mmap_rnd_compat_bits'
                          • sysctl: permission denied on key 'vm.stat_refresh'
                          Complex Check
                          OR
                          Criterion: Ensure at least one file named /etc/sysctl.conf exists and matches pattern ^\s*fs\.suid_dumpable\s*=\s*0\s*(\s+#.*)?$
                          Existence Check: At Least One Exists
                          Item Check: All
                          Result: Fail
                          No matching system items were found.
                          Criterion: Ensure at least one file(s) named ^.+$ in /etc/sysctl.d exists and matches pattern ^\s*fs\.suid_dumpable\s*=\s*0\s*(\s+#.*)?$
                          Existence Check: At Least One Exists
                          Item Check: All
                          Result: Fail
                          No matching system items were found.


                          Show Rule Result XML

                          References:

                            CIS Controls V7.0:

                            • Control 5: Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers: -- More

                            1.6 Mandatory Access Control

                            Mandatory Access Control (MAC) provides an additional layer of access restrictions to processes on top of the base Discretionary Access Controls. By restricting how processes can access files and resources on a system the potential impact from vulnerabilities in the processes can be reduced.

                            Impact: Mandatory Access Control limits the capabilities of applications and daemons on a system, while this can prevent unauthorized access the configuration of MAC can be complex and difficult to implement correctly preventing legitimate access from occurring.

                            Notes:

                            • Apparmor is the default MAC provided with Debian systems.
                            • Additional Mandatory Access Control systems to include SELinux exist. If a different Mandatory Access Control systems is used, please follow it's vendors guidance for proper implementation in place of the guidance provided in this section

                            1.6.1 Configure AppArmor

                            AppArmor provides a Mandatory Access Control (MAC) system that greatly augments the default Discretionary Access Control (DAC) model. Under AppArmor MAC rules are applied by file paths instead of by security contexts as in other MAC systems. As such it does not require support in the filesystem and can be applied to network mounted filesystems for example. AppArmor security policies define what system resources applications can access and what privileges they can do so with. This automatically limits the damage that the software can do to files accessible by the calling user. The user does not need to take any action to gain this benefit. For an action to occur, both the traditional DAC permissions must be satisfied as well as the AppArmor MAC rules. The action will not be allowed if either one of these models does not permit the action. In this way, AppArmor rules can only make a system's permissions more restrictive and secure.

                            References:

                            1. AppArmor Documentation: http://wiki.apparmor.net/index.php/Documentation
                            2. Ubuntu AppArmor Documentation: https://help.ubuntu.com/community/AppArmor
                            3. SUSE AppArmor Documentation: https://www.suse.com/documentation/apparmor/
                            Fail

                            1.6.1.2 Ensure AppArmor is enabled in the bootloader configuration

                            Description:

                            Configure AppArmor to be enabled at boot time and verify that it has not been overwritten by the bootloader boot parameters.

                            Note: This recommendation is designed around the grub bootloader, if LILO or another bootloader is in use in your environment enact equivalent settings.

                            AppArmor must be enabled at boot time in your bootloader configuration to ensure that the controls it provides are not overridden.

                            Edit /etc/default/grub and add the apparmor=1 and security=apparmor parameters to the GRUB_CMDLINE_LINUX= line

                            GRUB_CMDLINE_LINUX="apparmor=1 security=apparmor"

                            Run the following command to update the grub2 configuration:

                            # update-grub

                            Show Assessment Evidence
                            Complex Check
                            AND
                            Criterion: Ensure /boot/grub/grub.cfg contents Pattern Match apparmor=1 (string)
                            Existence Check: At Least One Exists
                            Item Check: All
                            Result: Fail
                            No matching system items were found.
                            Criterion: Ensure /boot/grub/grub.cfg contents Pattern Match security=apparmor (string)
                            Existence Check: At Least One Exists
                            Item Check: All
                            Result: Fail
                            No matching system items were found.


                            Show Rule Result XML

                            References:

                              CIS Controls V7.0:

                              • Control 14: Controlled Access Based on the Need to Know: -- More

                              Fail

                              1.6.1.3 Ensure all AppArmor Profiles are in enforce or complain mode

                              Description:

                              AppArmor profiles define what resources applications are able to access.

                              Security configuration requirements vary from site to site. Some sites may mandate a policy that is stricter than the default policy, which is perfectly acceptable. This item is intended to ensure that any policies that exist on the system are activated.

                              Run the following command to set all profiles to enforce mode:

                              # aa-enforce /etc/apparmor.d/*

                              OR

                              Run the following command to set all profiles to complain mode:

                              # aa-complain /etc/apparmor.d/*

                              Note: Any unconfined processes may need to have a profile created or activated for them and then be restarted

                              Show Assessment Evidence
                              Complex Check
                              AND
                              Criterion: Linux Custom Object "AppArmor has loaded profiles"
                              Existence Check: At Least One Exists
                              Item Check: All
                              Result: Fail
                              Apparmorstatus Item
                              Name Type Status Value
                              Loaded Profiles Count Int Does not exist No Value
                              Enforce Mode Profiles Count Int Does not exist No Value
                              Complain Mode Profiles Count Int Does not exist No Value
                              Processes With Profiles Count Int Does not exist No Value
                              Enforce Mode Processes Count Int Does not exist No Value
                              Complain Mode Processes Count Int Does not exist No Value
                              Unconfined Processes With Profiles Count Int Does not exist No Value
                              Criterion: Linux Custom Object "No AppArmor Processes Are Unconfined"
                              Existence Check: At Least One Exists
                              Item Check: All
                              Result: Fail
                              Apparmorstatus Item
                              Name Type Status Value
                              Loaded Profiles Count Int Does not exist No Value
                              Enforce Mode Profiles Count Int Does not exist No Value
                              Complain Mode Profiles Count Int Does not exist No Value
                              Processes With Profiles Count Int Does not exist No Value
                              Enforce Mode Processes Count Int Does not exist No Value
                              Complain Mode Processes Count Int Does not exist No Value
                              Unconfined Processes With Profiles Count Int Does not exist No Value


                              Show Rule Result XML

                              References:

                                CIS Controls V7.0:

                                • Control 14: Controlled Access Based on the Need to Know: -- More

                                1.7 Command Line Warning Banners

                                Presenting a warning message prior to the normal user login may assist in the prosecution of trespassers on the computer system. Changing some of these login banners also has the side effect of hiding OS version information and other detailed system information from attackers attempting to target specific exploits at a system. The /etc/motd , /etc/issue , and /etc/issue.net files govern warning banners for standard command line logins for both local and remote users.

                                Guidelines published by the US Department of Defense require that warning messages include at least the name of the organization that owns the system, the fact that the system is subject to monitoring and that such monitoring is in compliance with local statutes, and that use of the system implies consent to such monitoring. It is important that the organization's legal counsel review the content of all messages before any system modifications are made, as these warning messages are inherently site-specific. More information (including citations of relevant case law) can be found at http://www.justice.gov/criminal/cybercrime/

                                Note: The text provided in the remediation actions for these items is intended as an example only. Please edit to include the specific text for your organization as approved by your legal department

                                Fail

                                1.7.5 Ensure remote login warning banner is configured properly

                                Description:

                                The contents of the /etc/issue.net file are displayed to users prior to login for remote connections from configured services.

                                Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: \m - machine architecture \r - operating system release \s - operating system name \v - operating system version

                                Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the " uname -a " command once they have logged in.

                                Edit the /etc/issue.net file with the appropriate contents according to your site policy, remove any instances of \m , \r , \s , \v or references to the OS platform

                                # echo "Authorized uses only. All activity may be monitored and reported." > /etc/issue.net

                                Show Assessment Evidence
                                Complex Check
                                AND
                                Script: sce/wbissue.net.sh
                                Result: Fail
                                Exit Value: 102
                                Output:
                                • Warning Banner contains:
                                No error lines were collected.


                                Show Rule Result XML

                                References:

                                  CIS Controls V7.0:

                                  • Control 5: Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers: -- More

                                  Fail

                                  1.7.6 Ensure local login warning banner is configured properly

                                  Description:

                                  The contents of the /etc/issue file are displayed to users prior to login for local terminals.

                                  Unix-based systems have typically displayed information about the OS release and patch level upon logging in to the system. This information can be useful to developers who are developing software for a particular OS platform. If mingetty(8) supports the following options, they display operating system information: \m - machine architecture \r - operating system release \s - operating system name \v - operating system version - or the operating system's name

                                  Warning messages inform users who are attempting to login to the system of their legal status regarding the system and must include the name of the organization that owns the system and any monitoring policies that are in place. Displaying OS and patch level information in login banners also has the side effect of providing detailed system information to attackers attempting to target specific exploits of a system. Authorized users can easily get this information by running the " uname -a " command once they have logged in.

                                  Edit the /etc/issue file with the appropriate contents according to your site policy, remove any instances of \m , \r , \s , \v or references to the OS platform

                                  # echo "Authorized uses only. All activity may be monitored and reported." > /etc/issue

                                  Show Assessment Evidence
                                  Complex Check
                                  AND
                                  Script: sce/wbissue.sh
                                  Result: Fail
                                  Exit Value: 102
                                  Output:
                                  • Warning Banner contains:
                                  No error lines were collected.


                                  Show Rule Result XML

                                  References:

                                    CIS Controls V7.0:

                                    • Control 5: Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers: -- More

                                    1.8 GNOME Display Manager

                                    The GNOME Display Manager (GDM) is a program that manages graphical display servers and handles graphical user logins.

                                    Note: If GDM is not installed on the system, this section can be skipped

                                    2 Services

                                    While applying system updates and patches helps correct known vulnerabilities, one of the best ways to protect the system against as yet unreported vulnerabilities is to disable all services that are not required for normal system operation. This prevents the exploitation of vulnerabilities discovered at a later date. If a service is not enabled, it cannot be exploited. The actions in this section of the document provide guidance on some services which can be safely disabled and under which circumstances, greatly reducing the number of possible threats to the resulting system. Additionally some services which should remain enabled but with secure configuration are covered as well as insecure service clients.

                                    Note: This should not be considered a comprehensive list of insecure services. You may wish to consider additions to those listed here for your environment.

                                    2.1 Special Purpose Services

                                    This section describes services that are installed on systems that specifically need to run these services. If any of these services are not required, it is recommended that they be deleted from the system to reduce the potential attack surface. If a package is required as a dependency, and the service is not required, the service should be stopped and masked.

                                    The following command can be used to stop and mask the service:

                                    # systemctl --now mask <service_name>

                                    2.1.1 Time Synchronization

                                    It is recommended that physical systems and virtual guests lacking direct access to the physical host's clock be configured to synchronize their time using a service such as systemd-timesyncd, chrony, or ntp.

                                    Notes:

                                    • If access to a physical host's clock is available and configured according to site policy, this section can be skipped
                                    • Only one time synchronization method should be in use on the system
                                    • Only the section related to the time synchronization method in use on the system should be followed, all other time synchronization recommendations should be skipped
                                    • If access to a physical host's clock is available and configured according to site policy, systemd-timesyncd should be stopped and masked
                                    Fail

                                    2.1.10 Ensure HTTP server is not installed

                                    Description:

                                    HTTP or web servers provide the ability to host web site content.

                                    Unless there is a need to run the system as a web server, it is recommended that the package be deleted to reduce the potential attack surface.

                                    Run the following command to remove apache :

                                    # apt purge apache2

                                    Show Assessment Evidence
                                    Complex Check
                                    AND
                                    Criterion: Ensure package name equals 'apache2' is not installed
                                    Existence Check: None Exist
                                    Item Check: All
                                    Result: Fail
                                    Dpkginfo Item
                                    Name Type Status Value
                                    Name String Exists apache2
                                    Arch String Exists amd64
                                    Epoch String Exists (none)
                                    Release String Exists 1ubuntu4.19
                                    Version String Exists 2.4.29
                                    Evr Evr String Exists 0:2.4.29-1ubuntu4.19


                                    Show Rule Result XML

                                    References:

                                      CIS Controls V7.0:

                                      • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More

                                      2.2 Service Clients

                                      A number of insecure services exist. While disabling the servers prevents a local attack against these services, it is advised to remove their clients unless they are required.

                                      Note: This should not be considered a comprehensive list of insecure service clients. You may wish to consider additions to those listed here for your environment.

                                      Fail

                                      2.2.4 Ensure telnet client is not installed

                                      Description:

                                      The telnet package contains the telnet client, which allows users to start connections to other systems via the telnet protocol.

                                      The telnet protocol is insecure and unencrypted. The use of an unencrypted transmission medium could allow an unauthorized user to steal credentials. The ssh package provides an encrypted session and stronger security and is included in most Linux distributions.

                                      Uninstall telnet :

                                      # apt purge telnet

                                      Impact:

                                      Many insecure service clients are used as troubleshooting tools and in testing environments. Uninstalling them can inhibit capability to test and troubleshoot. If they are required it is advisable to remove the clients after use to prevent accidental or intentional misuse.

                                      Show Assessment Evidence
                                      Complex Check
                                      AND
                                      Criterion: Ensure package name equals 'telnet' is not installed
                                      Existence Check: None Exist
                                      Item Check: All
                                      Result: Fail
                                      Dpkginfo Item
                                      Name Type Status Value
                                      Name String Exists telnet
                                      Arch String Exists amd64
                                      Epoch String Exists (none)
                                      Release String Exists 41
                                      Version String Exists 0.17
                                      Evr Evr String Exists 0:0.17-41


                                      Show Rule Result XML

                                      References:

                                        CIS Controls V7.0:

                                        • Control 4: Controlled Use of Administrative Privileges: -- More

                                        3 Network Configuration

                                        This section provides guidance on for securing the network configuration of the system through kernel parameters, access list control, and firewall settings.

                                        3.1 Disable unused network protocols and devices

                                        To reduce the attack surface of a system, unused network protocols and devices should be disabled.

                                        3.2 Network Parameters (Host Only)

                                        The following network parameters are intended for use if the system is to act as a host only. A system is considered host only if the system has a single interface, or has multiple interfaces but will not be configured as a router.

                                        Note:

                                        Configuration files are read from directories in /etc/ , /run/ , /usr/local/lib/ , and /lib/ , in order of precedence. Files must have the the ".conf" extension. extension. Files in /etc/ override files with the same name in /run/ , /usr/local/lib/ , and /lib/ . Files in /run/ override files with the same name under /usr/ .

                                        All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Thus, the configuration in a certain file may either be replaced completely (by placing a file with the same name in a directory with higher priority), or individual settings might be changed (by specifying additional settings in a file with a different name that is ordered later).

                                        Packages should install their configuration files in /usr/lib/ (distribution packages) or /usr/local/lib/ (local installs). Files in /etc/ are reserved for the local administrator, who may use this logic to override the configuration files installed by vendor packages. It is recommended to prefix all filenames with a two-digit number and a dash, to simplify the ordering of the files.

                                        If the administrator wants to disable a configuration file supplied by the vendor, the recommended way is to place a symlink to /dev/null in the configuration directory in /etc/ , with the same filename as the vendor configuration file. If the vendor configuration file is included in the initrd image, the image has to be regenerated.

                                        Fail

                                        3.2.1 Ensure packet redirect sending is disabled

                                        Description:

                                        ICMP Redirects are used to send routing information to other hosts. As a host itself does not act as a router (in a host only configuration), there is no need to send redirects.

                                        An attacker could use a compromised host to send invalid ICMP redirects to other router devices in an attempt to corrupt routing and have users access a system set up by the attacker as opposed to a valid system.

                                        Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file:

                                        net.ipv4.conf.all.send_redirects = 0

                                        net.ipv4.conf.default.send_redirects = 0

                                        Run the following commands to set the active kernel parameters:

                                        # sysctl -w net.ipv4.conf.all.send_redirects=0

                                        # sysctl -w net.ipv4.conf.default.send_redirects=0

                                        # sysctl -w net.ipv4.route.flush=1

                                        Show Assessment Evidence
                                        Complex Check
                                        AND
                                        Criterion: Ensure 'net.ipv4.conf.all.send_redirects' kernel parameter Equals 0 (int)
                                        Existence Check: At Least One Exists
                                        Item Check: All
                                        Result: Fail
                                        No matching system items were found.
                                        Criterion: Ensure 'net.ipv4.conf.all.send_redirects' kernel parameter Equals 0 (int)
                                        Existence Check: At Least One Exists
                                        Item Check: All
                                        Result: Fail
                                        No matching system items were found.
                                        Criterion: Ensure 'net.ipv4.conf.all.send_redirects' kernel parameter Equals 0 (int)
                                        Existence Check: At Least One Exists
                                        Item Check: All
                                        Result: Fail
                                        No matching system items were found.
                                        Criterion: Ensure 'net.ipv4.conf.default.send_redirects' kernel parameter Equals 0 (int)
                                        Existence Check: At Least One Exists
                                        Item Check: All
                                        Result: Fail
                                        No matching system items were found.
                                        Criterion: Ensure 'net.ipv4.conf.default.send_redirects' kernel parameter Equals 0 (int)
                                        Existence Check: At Least One Exists
                                        Item Check: All
                                        Result: Fail
                                        No matching system items were found.
                                        Criterion: Ensure 'net.ipv4.conf.default.send_redirects' kernel parameter Equals 0 (int)
                                        Existence Check: At Least One Exists
                                        Item Check: All
                                        Result: Fail
                                        No matching system items were found.


                                        Show Rule Result XML

                                        References:

                                          CIS Controls V7.0:

                                          • Control 5: Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers: -- More

                                          Fail

                                          3.2.2 Ensure IP forwarding is disabled

                                          Description:

                                          The net.ipv4.ip_forward and net.ipv6.conf.all.forwarding flags are used to tell the system whether it can forward packets or not.

                                          Setting the flags to 0 ensures that a system with multiple interfaces (for example, a hard proxy), will never be able to forward packets, and therefore, never serve as a router.

                                          Run the following command to restore the default parameter and set the active kernel parameter:

                                          # grep -Els "^\s*net\.ipv4\.ip_forward\s*=\s*1" /etc/sysctl.conf /etc/sysctl.d/*.conf /usr/lib/sysctl.d/*.conf /run/sysctl.d/*.conf | while read filename; do sed -ri "s/^\s*(net\.ipv4\.ip_forward\s*)(=)(\s*\S+\b).*$/# *REMOVED* \1/" $filename; done; sysctl -w net.ipv4.ip_forward=0; sysctl -w net.ipv4.route.flush=1

                                          IF IPv6 is enabled:

                                          Run the following command to restore the default parameter and set the active kernel parameter:

                                          # grep -Els "^\s*net\.ipv6\.conf\.all\.forwarding\s*=\s*1" /etc/sysctl.conf /etc/sysctl.d/*.conf /usr/lib/sysctl.d/*.conf /run/sysctl.d/*.conf | while read filename; do sed -ri "s/^\s*(net\.ipv6\.conf\.all\.forwarding\s*)(=)(\s*\S+\b).*$/# *REMOVED* \1/" $filename; done; sysctl -w net.ipv6.conf.all.forwarding=0; sysctl -w net.ipv6.route.flush=1

                                          Show Assessment Evidence
                                          Complex Check
                                          AND
                                          Complex Check
                                          AND
                                          Complex Check
                                          AND
                                          Complex Check
                                          AND
                                          Complex Check
                                          AND
                                          Script: sce/sysctl_running_config.sh
                                          Result: Fail
                                          Exit Value: 102
                                          Output:
                                          • Missing sysctl parameter.
                                          Errors:
                                          • sysctl: permission denied on key 'fs.protected_fifos'
                                          • sysctl: permission denied on key 'fs.protected_regular'
                                          • sysctl: permission denied on key 'kernel.cad_pid'
                                          • sysctl: permission denied on key 'kernel.unprivileged_userns_apparmor_policy'
                                          • sysctl: reading key "net.ipv6.conf.default.stable_secret"
                                          • sysctl: reading key "net.ipv6.conf.docker0.stable_secret"
                                          • sysctl: reading key "net.ipv6.conf.eth0.stable_secret"
                                          • sysctl: reading key "net.ipv6.conf.eth1.stable_secret"
                                          • sysctl: reading key "net.ipv6.conf.flannel/1.stable_secret"
                                          • sysctl: reading key "net.ipv6.conf.lo.stable_secret"
                                          • sysctl: reading key "net.ipv6.conf.veth970eb406.stable_secret"
                                          • sysctl: reading key "net.ipv6.conf.vethe2d33714.stable_secret"
                                          • sysctl: permission denied on key 'vm.mmap_rnd_bits'
                                          • sysctl: permission denied on key 'vm.mmap_rnd_compat_bits'
                                          • sysctl: permission denied on key 'vm.stat_refresh'
                                          Criterion: Ensure no file named /etc/sysctl.conf exists and matches pattern ^\s*net\.ipv4\.ip_forward\s*=\s*1\s*
                                          Existence Check: None Exist
                                          Item Check: All
                                          Result: Pass
                                          No matching system items were found.
                                          Criterion: Ensure no file(s) named ^\S+\.conf$ in /etc/sysctl.d/ exists and matches pattern ^\s*net\.ipv4\.ip_forward\s*=\s*1\s*
                                          Existence Check: None Exist
                                          Item Check: All
                                          Result: Pass
                                          No matching system items were found.
                                          Criterion: Ensure no file(s) named ^\S+\.conf$ in /usr/lib/sysctl.d/ exists and matches pattern ^\s*net\.ipv4\.ip_forward\s*=\s*1\s*
                                          Existence Check: None Exist
                                          Item Check: All
                                          Result: Pass
                                          No matching system items were found.
                                          Criterion: Ensure no file(s) named ^\S+\.conf$ in /run/sysctl.d/ exists and matches pattern ^\s*net\.ipv4\.ip_forward\s*=\s*1\s*
                                          Existence Check: None Exist
                                          Item Check: All
                                          Result: Pass
                                          No matching system items were found.
                                          Complex Check
                                          OR
                                          Complex Check
                                          AND
                                          Complex Check
                                          AND
                                          Complex Check
                                          AND
                                          Complex Check
                                          AND
                                          Script: sce/sysctl_running_config.sh
                                          Result: Fail
                                          Exit Value: 102
                                          Output:
                                          • Missing sysctl parameter.
                                          Errors:
                                          • sysctl: permission denied on key 'fs.protected_fifos'
                                          • sysctl: permission denied on key 'fs.protected_regular'
                                          • sysctl: permission denied on key 'kernel.cad_pid'
                                          • sysctl: permission denied on key 'kernel.unprivileged_userns_apparmor_policy'
                                          • sysctl: reading key "net.ipv6.conf.default.stable_secret"
                                          • sysctl: reading key "net.ipv6.conf.docker0.stable_secret"
                                          • sysctl: reading key "net.ipv6.conf.eth0.stable_secret"
                                          • sysctl: reading key "net.ipv6.conf.eth1.stable_secret"
                                          • sysctl: reading key "net.ipv6.conf.flannel/1.stable_secret"
                                          • sysctl: reading key "net.ipv6.conf.lo.stable_secret"
                                          • sysctl: reading key "net.ipv6.conf.veth970eb406.stable_secret"
                                          • sysctl: reading key "net.ipv6.conf.vethe2d33714.stable_secret"
                                          • sysctl: permission denied on key 'vm.mmap_rnd_bits'
                                          • sysctl: permission denied on key 'vm.mmap_rnd_compat_bits'
                                          • sysctl: permission denied on key 'vm.stat_refresh'
                                          Criterion: Ensure no file named /etc/sysctl.conf exists and matches pattern ^\s*net\.ipv6\.conf\.all\.forwarding\s*=\s*1\s*
                                          Existence Check: None Exist
                                          Item Check: All
                                          Result: Pass
                                          No matching system items were found.
                                          Criterion: Ensure no file(s) named ^\S+\.conf$ in /etc/sysctl.d/ exists and matches pattern ^\s*net\.ipv6\.conf\.all\.forwarding\s*=\s*1\s*
                                          Existence Check: None Exist
                                          Item Check: All
                                          Result: Pass
                                          No matching system items were found.
                                          Criterion: Ensure no file(s) named ^\S+\.conf$ in /usr/lib/sysctl.d/ exists and matches pattern ^\s*net\.ipv6\.conf\.all\.forwarding\s*=\s*1\s*
                                          Existence Check: None Exist
                                          Item Check: All
                                          Result: Pass
                                          No matching system items were found.
                                          Criterion: Ensure no file(s) named ^\S+\.conf$ in /run/sysctl.d/ exists and matches pattern ^\s*net\.ipv6\.conf\.all\.forwarding\s*=\s*1\s*
                                          Existence Check: None Exist
                                          Item Check: All
                                          Result: Pass
                                          No matching system items were found.
                                          Script: sce/ipv6_disabled_v2.sh
                                          Result: Fail
                                          Exit Value: 102
                                          Output:
                                          • IPv6 is enabled on the system
                                          No error lines were collected.


                                          Show Rule Result XML

                                          References:

                                            CIS Controls V7.0:

                                            • Control 5: Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers: -- More

                                            3.3 Network Parameters (Host and Router)

                                            The following network parameters are intended for use on both host only and router systems. A system acts as a router if it has at least two interfaces and is configured to perform routing functions.

                                            Note:

                                            Configuration files are read from directories in /etc/ , /run/ , /usr/local/lib/ , and /lib/ , in order of precedence. Files must have the the ".conf" extension. extension. Files in /etc/ override files with the same name in /run/ , /usr/local/lib/ , and /lib/ . Files in /run/ override files with the same name under /usr/ .

                                            All configuration files are sorted by their filename in lexicographic order, regardless of which of the directories they reside in. If multiple files specify the same option, the entry in the file with the lexicographically latest name will take precedence. Thus, the configuration in a certain file may either be replaced completely (by placing a file with the same name in a directory with higher priority), or individual settings might be changed (by specifying additional settings in a file with a different name that is ordered later).

                                            Packages should install their configuration files in /usr/lib/ (distribution packages) or /usr/local/lib/ (local installs). Files in /etc/ are reserved for the local administrator, who may use this logic to override the configuration files installed by vendor packages. It is recommended to prefix all filenames with a two-digit number and a dash, to simplify the ordering of the files.

                                            If the administrator wants to disable a configuration file supplied by the vendor, the recommended way is to place a symlink to /dev/null in the configuration directory in /etc/ , with the same filename as the vendor configuration file. If the vendor configuration file is included in the initrd image, the image has to be regenerated.

                                            Fail

                                            3.3.1 Ensure source routed packets are not accepted

                                            Description:

                                            In networking, source routing allows a sender to partially or fully specify the route packets take through a network. In contrast, non-source routed packets travel a path determined by routers in the network. In some cases, systems may not be routable or reachable from some locations (e.g. private addresses vs. Internet routable), and so source routed packets would need to be used.

                                            Setting net.ipv4.conf.all.accept_source_route, net.ipv4.conf.default.accept_source_route, net.ipv6.conf.all.accept_source_route and net.ipv6.conf.default.accept_source_route to 0 disables the system from accepting source routed packets. Assume this system was capable of routing packets to Internet routable addresses on one interface and private addresses on another interface. Assume that the private addresses were not routable to the Internet routable addresses and vice versa. Under normal routing circumstances, an attacker from the Internet routable addresses could not use the system as a way to reach the private address systems. If, however, source routed packets were allowed, they could be used to gain access to the private address systems as the route could be specified, rather than rely on routing protocols that did not allow this routing.

                                            Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file:

                                            net.ipv4.conf.all.accept_source_route = 0

                                            net.ipv4.conf.default.accept_source_route = 0

                                            Run the following commands to set the active kernel parameters:

                                            # sysctl -w net.ipv4.conf.all.accept_source_route=0

                                            # sysctl -w net.ipv4.conf.default.accept_source_route=0

                                            # sysctl -w net.ipv4.route.flush=1

                                            IF IPv6 is enabled:

                                            Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file:

                                            net.ipv6.conf.all.accept_source_route = 0

                                            net.ipv6.conf.default.accept_source_route = 0

                                            Run the following commands to set the active kernel parameters:

                                            # sysctl -w net.ipv6.conf.all.accept_source_route=0

                                            # sysctl -w net.ipv6.conf.default.accept_source_route=0

                                            # sysctl -w net.ipv6.route.flush=1

                                            Show Assessment Evidence
                                            Complex Check
                                            AND
                                            Complex Check
                                            AND
                                            Criterion: Ensure 'net.ipv4.conf.all.accept_source_route' kernel parameter Equals 0 (int)
                                            Existence Check: At Least One Exists
                                            Item Check: All
                                            Result: Fail
                                            No matching system items were found.
                                            Criterion: Ensure 'net.ipv4.conf.all.accept_source_route' kernel parameter Equals 0 (int)
                                            Existence Check: At Least One Exists
                                            Item Check: All
                                            Result: Fail
                                            No matching system items were found.
                                            Criterion: Ensure 'net.ipv4.conf.all.accept_source_route' kernel parameter Equals 0 (int)
                                            Existence Check: At Least One Exists
                                            Item Check: All
                                            Result: Fail
                                            No matching system items were found.
                                            Criterion: Ensure 'net.ipv4.conf.default.accept_source_route' kernel parameter Equals 0 (int)
                                            Existence Check: At Least One Exists
                                            Item Check: All
                                            Result: Fail
                                            No matching system items were found.
                                            Criterion: Ensure 'net.ipv4.conf.default.accept_source_route' kernel parameter Equals 0 (int)
                                            Existence Check: At Least One Exists
                                            Item Check: All
                                            Result: Fail
                                            No matching system items were found.
                                            Criterion: Ensure 'net.ipv4.conf.default.accept_source_route' kernel parameter Equals 0 (int)
                                            Existence Check: At Least One Exists
                                            Item Check: All
                                            Result: Fail
                                            No matching system items were found.
                                            Complex Check
                                            OR
                                            Complex Check
                                            AND
                                            Criterion: Ensure 'net.ipv6.conf.all.accept_source_route' kernel parameter Equals 0 (int)
                                            Existence Check: At Least One Exists
                                            Item Check: All
                                            Result: Fail
                                            No matching system items were found.
                                            Criterion: Ensure 'net.ipv6.conf.all.accept_source_route' kernel parameter Equals 0 (int)
                                            Existence Check: At Least One Exists
                                            Item Check: All
                                            Result: Fail
                                            No matching system items were found.
                                            Criterion: Ensure 'net.ipv6.conf.all.accept_source_route' kernel parameter Equals 0 (int)
                                            Existence Check: At Least One Exists
                                            Item Check: All
                                            Result: Fail
                                            No matching system items were found.
                                            Criterion: Ensure 'net.ipv6.conf.default.accept_source_route' kernel parameter Equals 0 (int)
                                            Existence Check: At Least One Exists
                                            Item Check: All
                                            Result: Fail
                                            No matching system items were found.
                                            Criterion: Ensure 'net.ipv6.conf.default.accept_source_route' kernel parameter Equals 0 (int)
                                            Existence Check: At Least One Exists
                                            Item Check: All
                                            Result: Fail
                                            No matching system items were found.
                                            Criterion: Ensure 'net.ipv6.conf.default.accept_source_route' kernel parameter Equals 0 (int)
                                            Existence Check: At Least One Exists
                                            Item Check: All
                                            Result: Pass
                                            Sysctl Item
                                            Name Type Status Value
                                            Name String Exists net.ipv6.conf.default.accept_source_route
                                            Value Int Exists 0
                                            Script: sce/ipv6_disabled_v2.sh
                                            Result: Fail
                                            Exit Value: 102
                                            Output:
                                            • IPv6 is enabled on the system
                                            No error lines were collected.


                                            Show Rule Result XML

                                            References:

                                              CIS Controls V7.0:

                                              • Control 5: Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers: -- More

                                              Fail

                                              3.3.2 Ensure ICMP redirects are not accepted

                                              Description:

                                              ICMP redirect messages are packets that convey routing information and tell your host (acting as a router) to send packets via an alternate path. It is a way of allowing an outside routing device to update your system routing tables. By setting net.ipv4.conf.all.accept_redirects and net.ipv6.conf.all.accept_redirects to 0, the system will not accept any ICMP redirect messages, and therefore, won't allow outsiders to update the system's routing tables.

                                              Attackers could use bogus ICMP redirect messages to maliciously alter the system routing tables and get them to send packets to incorrect networks and allow your system packets to be captured.

                                              Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file:

                                              net.ipv4.conf.all.accept_redirects = 0

                                              net.ipv4.conf.default.accept_redirects = 0

                                              Run the following commands to set the active kernel parameters:

                                              # sysctl -w net.ipv4.conf.all.accept_redirects=0

                                              # sysctl -w net.ipv4.conf.default.accept_redirects=0

                                              # sysctl -w net.ipv4.route.flush=1

                                              IF IPv6 is enabled:

                                              Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file:

                                              net.ipv6.conf.all.accept_redirects = 0

                                              net.ipv6.conf.default.accept_redirects = 0

                                              Run the following commands to set the active kernel parameters:

                                              # sysctl -w net.ipv6.conf.all.accept_redirects=0

                                              # sysctl -w net.ipv6.conf.default.accept_redirects=0

                                              # sysctl -w net.ipv6.route.flush=1

                                              Show Assessment Evidence
                                              Complex Check
                                              AND
                                              Complex Check
                                              AND
                                              Criterion: Ensure 'net.ipv4.conf.all.accept_redirects' kernel parameter Equals 0 (int)
                                              Existence Check: At Least One Exists
                                              Item Check: All
                                              Result: Fail
                                              No matching system items were found.
                                              Criterion: Ensure 'net.ipv4.conf.all.accept_redirects' kernel parameter Equals 0 (int)
                                              Existence Check: At Least One Exists
                                              Item Check: All
                                              Result: Fail
                                              No matching system items were found.
                                              Criterion: Ensure 'net.ipv4.conf.all.accept_redirects' kernel parameter Equals 0 (int)
                                              Existence Check: At Least One Exists
                                              Item Check: All
                                              Result: Fail
                                              No matching system items were found.
                                              Criterion: Ensure 'net.ipv4.conf.all.accept_redirects' kernel parameter Equals 0 (int)
                                              Existence Check: At Least One Exists
                                              Item Check: All
                                              Result: Fail
                                              No matching system items were found.
                                              Criterion: Ensure 'net.ipv4.conf.all.accept_redirects' kernel parameter Equals 0 (int)
                                              Existence Check: At Least One Exists
                                              Item Check: All
                                              Result: Fail
                                              No matching system items were found.
                                              Criterion: Ensure 'net.ipv4.conf.all.accept_redirects' kernel parameter Equals 0 (int)
                                              Existence Check: At Least One Exists
                                              Item Check: All
                                              Result: Fail
                                              No matching system items were found.
                                              Complex Check
                                              OR
                                              Complex Check
                                              AND
                                              Criterion: Ensure 'net.ipv6.conf.all.accept_redirects' kernel parameter Equals 0 (int)
                                              Existence Check: At Least One Exists
                                              Item Check: All
                                              Result: Fail
                                              No matching system items were found.
                                              Criterion: Ensure 'net.ipv6.conf.all.accept_redirects' kernel parameter Equals 0 (int)
                                              Existence Check: At Least One Exists
                                              Item Check: All
                                              Result: Fail
                                              No matching system items were found.
                                              Criterion: Ensure 'net.ipv6.conf.all.accept_redirects' kernel parameter Equals 0 (int)
                                              Existence Check: At Least One Exists
                                              Item Check: All
                                              Result: Fail
                                              No matching system items were found.
                                              Criterion: Ensure 'net.ipv6.conf.default.accept_redirects' kernel parameter Equals 0 (int)
                                              Existence Check: At Least One Exists
                                              Item Check: All
                                              Result: Fail
                                              No matching system items were found.
                                              Criterion: Ensure 'net.ipv6.conf.default.accept_redirects' kernel parameter Equals 0 (int)
                                              Existence Check: At Least One Exists
                                              Item Check: All
                                              Result: Fail
                                              No matching system items were found.
                                              Criterion: Ensure 'net.ipv6.conf.default.accept_redirects' kernel parameter Equals 0 (int)
                                              Existence Check: At Least One Exists
                                              Item Check: All
                                              Result: Fail
                                              Sysctl Item
                                              Name Type Status Value
                                              Name String Exists net.ipv6.conf.default.accept_redirects
                                              Value Int Exists 1
                                              Script: sce/ipv6_disabled_v2.sh
                                              Result: Fail
                                              Exit Value: 102
                                              Output:
                                              • IPv6 is enabled on the system
                                              No error lines were collected.


                                              Show Rule Result XML

                                              References:

                                                CIS Controls V7.0:

                                                • Control 5: Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers: -- More

                                                Fail

                                                3.3.3 Ensure secure ICMP redirects are not accepted

                                                Description:

                                                Secure ICMP redirects are the same as ICMP redirects, except they come from gateways listed on the default gateway list. It is assumed that these gateways are known to your system, and that they are likely to be secure.

                                                It is still possible for even known gateways to be compromised. Setting net.ipv4.conf.all.secure_redirects to 0 protects the system from routing table updates by possibly compromised known gateways.

                                                Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file:

                                                net.ipv4.conf.all.secure_redirects = 0

                                                net.ipv4.conf.default.secure_redirects = 0

                                                Run the following commands to set the active kernel parameters:

                                                # sysctl -w net.ipv4.conf.all.secure_redirects=0

                                                # sysctl -w net.ipv4.conf.default.secure_redirects=0

                                                # sysctl -w net.ipv4.route.flush=1

                                                Show Assessment Evidence
                                                Complex Check
                                                AND
                                                Criterion: Ensure 'net.ipv4.conf.all.secure_redirects' kernel parameter Equals 0 (int)
                                                Existence Check: At Least One Exists
                                                Item Check: All
                                                Result: Fail
                                                No matching system items were found.
                                                Criterion: Ensure 'net.ipv4.conf.all.secure_redirects' kernel parameter Equals 0 (int)
                                                Existence Check: At Least One Exists
                                                Item Check: All
                                                Result: Fail
                                                No matching system items were found.
                                                Criterion: Ensure 'net.ipv4.conf.all.secure_redirects' kernel parameter Equals 0 (int)
                                                Existence Check: At Least One Exists
                                                Item Check: All
                                                Result: Fail
                                                No matching system items were found.
                                                Criterion: Ensure 'net.ipv4.conf.default.secure_redirects' kernel parameter Equals 0 (int)
                                                Existence Check: At Least One Exists
                                                Item Check: All
                                                Result: Fail
                                                No matching system items were found.
                                                Criterion: Ensure 'net.ipv4.conf.default.secure_redirects' kernel parameter Equals 0 (int)
                                                Existence Check: At Least One Exists
                                                Item Check: All
                                                Result: Fail
                                                No matching system items were found.
                                                Criterion: Ensure 'net.ipv4.conf.default.secure_redirects' kernel parameter Equals 0 (int)
                                                Existence Check: At Least One Exists
                                                Item Check: All
                                                Result: Fail
                                                No matching system items were found.


                                                Show Rule Result XML

                                                References:

                                                  CIS Controls V7.0:

                                                  • Control 5: Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers: -- More

                                                  Fail

                                                  3.3.4 Ensure suspicious packets are logged

                                                  Description:

                                                  When enabled, this feature logs packets with un-routable source addresses to the kernel log.

                                                  Enabling this feature and logging these packets allows an administrator to investigate the possibility that an attacker is sending spoofed packets to their system.

                                                  Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file:

                                                  net.ipv4.conf.all.log_martians = 1

                                                  net.ipv4.conf.default.log_martians = 1

                                                  Run the following commands to set the active kernel parameters:

                                                  # sysctl -w net.ipv4.conf.all.log_martians=1

                                                  # sysctl -w net.ipv4.conf.default.log_martians=1

                                                  # sysctl -w net.ipv4.route.flush=1

                                                  Show Assessment Evidence
                                                  Complex Check
                                                  AND
                                                  Criterion: Ensure 'net.ipv4.conf.all.log_martians' kernel parameter Equals 1 (int)
                                                  Existence Check: At Least One Exists
                                                  Item Check: All
                                                  Result: Fail
                                                  No matching system items were found.
                                                  Criterion: Ensure 'net.ipv4.conf.all.log_martians' kernel parameter Equals 1 (int)
                                                  Existence Check: At Least One Exists
                                                  Item Check: All
                                                  Result: Fail
                                                  No matching system items were found.
                                                  Criterion: Ensure 'net.ipv4.conf.all.log_martians' kernel parameter Equals 1 (int)
                                                  Existence Check: At Least One Exists
                                                  Item Check: All
                                                  Result: Fail
                                                  No matching system items were found.
                                                  Criterion: Ensure 'net.ipv4.conf.default.log_martians' kernel parameter Equals 1 (int)
                                                  Existence Check: At Least One Exists
                                                  Item Check: All
                                                  Result: Fail
                                                  No matching system items were found.
                                                  Criterion: Ensure 'net.ipv4.conf.default.log_martians' kernel parameter Equals 1 (int)
                                                  Existence Check: At Least One Exists
                                                  Item Check: All
                                                  Result: Fail
                                                  No matching system items were found.
                                                  Criterion: Ensure 'net.ipv4.conf.default.log_martians' kernel parameter Equals 1 (int)
                                                  Existence Check: At Least One Exists
                                                  Item Check: All
                                                  Result: Fail
                                                  No matching system items were found.


                                                  Show Rule Result XML

                                                  References:

                                                    CIS Controls V7.0:

                                                    • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                                                    • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More

                                                    Fail

                                                    3.3.5 Ensure broadcast ICMP requests are ignored

                                                    Description:

                                                    Setting net.ipv4.icmp_echo_ignore_broadcasts to 1 will cause the system to ignore all ICMP echo and timestamp requests to broadcast and multicast addresses.

                                                    Accepting ICMP echo and timestamp requests with broadcast or multicast destinations for your network could be used to trick your host into starting (or participating) in a Smurf attack. A Smurf attack relies on an attacker sending large amounts of ICMP broadcast messages with a spoofed source address. All hosts receiving this message and responding would send echo-reply messages back to the spoofed address, which is probably not routable. If many hosts respond to the packets, the amount of traffic on the network could be significantly multiplied.

                                                    Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file:

                                                    net.ipv4.icmp_echo_ignore_broadcasts = 1

                                                    Run the following commands to set the active kernel parameters:

                                                    # sysctl -w net.ipv4.icmp_echo_ignore_broadcasts=1 # sysctl -w net.ipv4.route.flush=1

                                                    Show Assessment Evidence
                                                    Complex Check
                                                    AND
                                                    Criterion: Ensure 'net.ipv4.icmp_echo_ignore_broadcasts' kernel parameter Equals 1 (int)
                                                    Existence Check: At Least One Exists
                                                    Item Check: All
                                                    Result: Fail
                                                    No matching system items were found.
                                                    Criterion: Ensure 'net.ipv4.icmp_echo_ignore_broadcasts' kernel parameter Equals 1 (int)
                                                    Existence Check: At Least One Exists
                                                    Item Check: All
                                                    Result: Fail
                                                    No matching system items were found.
                                                    Criterion: Ensure 'net.ipv4.icmp_echo_ignore_broadcasts' kernel parameter Equals 1 (int)
                                                    Existence Check: At Least One Exists
                                                    Item Check: All
                                                    Result: Pass
                                                    Sysctl Item
                                                    Name Type Status Value
                                                    Name String Exists net.ipv4.icmp_echo_ignore_broadcasts
                                                    Value Int Exists 1


                                                    Show Rule Result XML

                                                    References:

                                                      CIS Controls V7.0:

                                                      • Control 5: Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers: -- More

                                                      Fail

                                                      3.3.6 Ensure bogus ICMP responses are ignored

                                                      Description:

                                                      Setting icmp_ignore_bogus_error_responses to 1 prevents the kernel from logging bogus responses (RFC-1122 non-compliant) from broadcast reframes, keeping file systems from filling up with useless log messages.

                                                      Some routers (and some attackers) will send responses that violate RFC-1122 and attempt to fill up a log file system with many useless error messages.

                                                      Set the following parameter in /etc/sysctl.conf or a /etc/sysctl.d/* file:

                                                      net.ipv4.icmp_ignore_bogus_error_responses = 1

                                                      Run the following commands to set the active kernel parameters:

                                                      # sysctl -w net.ipv4.icmp_ignore_bogus_error_responses=1 # sysctl -w net.ipv4.route.flush=1

                                                      Show Assessment Evidence
                                                      Complex Check
                                                      AND
                                                      Criterion: Ensure 'net.ipv4.icmp_ignore_bogus_error_responses' kernel parameter Equals 1 (int)
                                                      Existence Check: At Least One Exists
                                                      Item Check: All
                                                      Result: Fail
                                                      No matching system items were found.
                                                      Criterion: Ensure 'net.ipv4.icmp_ignore_bogus_error_responses' kernel parameter Equals 1 (int)
                                                      Existence Check: At Least One Exists
                                                      Item Check: All
                                                      Result: Fail
                                                      No matching system items were found.
                                                      Criterion: Ensure 'net.ipv4.icmp_ignore_bogus_error_responses' kernel parameter Equals 1 (int)
                                                      Existence Check: At Least One Exists
                                                      Item Check: All
                                                      Result: Pass
                                                      Sysctl Item
                                                      Name Type Status Value
                                                      Name String Exists net.ipv4.icmp_ignore_bogus_error_responses
                                                      Value Int Exists 1


                                                      Show Rule Result XML

                                                      References:

                                                        CIS Controls V7.0:

                                                        • Control 5: Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers: -- More

                                                        Fail

                                                        3.3.7 Ensure Reverse Path Filtering is enabled

                                                        Description:

                                                        Setting net.ipv4.conf.all.rp_filter and net.ipv4.conf.default.rp_filter to 1 forces the Linux kernel to utilize reverse path filtering on a received packet to determine if the packet was valid. Essentially, with reverse path filtering, if the return packet does not go out the same interface that the corresponding source packet came from, the packet is dropped (and logged if log_martians is set).

                                                        Setting these flags is a good way to deter attackers from sending your system bogus packets that cannot be responded to. One instance where this feature breaks down is if asymmetrical routing is employed. This would occur when using dynamic routing protocols (bgp, ospf, etc) on your system. If you are using asymmetrical routing on your system, you will not be able to enable this feature without breaking the routing.

                                                        Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file:

                                                        net.ipv4.conf.all.rp_filter = 1

                                                        net.ipv4.conf.default.rp_filter = 1

                                                        Run the following commands to set the active kernel parameters:

                                                        # sysctl -w net.ipv4.conf.all.rp_filter=1 # sysctl -w net.ipv4.conf.default.rp_filter=1 # sysctl -w net.ipv4.route.flush=1

                                                        Show Assessment Evidence
                                                        Complex Check
                                                        AND
                                                        Criterion: Ensure 'net.ipv4.conf.all.rp_filter' kernel parameter Equals 1 (int)
                                                        Existence Check: At Least One Exists
                                                        Item Check: All
                                                        Result: Fail
                                                        No matching system items were found.
                                                        Criterion: Ensure 'net.ipv4.conf.all.rp_filter' kernel parameter Equals 1 (int)
                                                        Existence Check: At Least One Exists
                                                        Item Check: All
                                                        Result: Pass
                                                        Textfilecontent Item
                                                        Name Type Status Value
                                                        Filepath String Exists /etc/sysctl.d/10-network-security.conf
                                                        Path String Exists /etc/sysctl.d
                                                        Filename String Exists 10-network-security.conf
                                                        Pattern String Exists ^\s*net.ipv4.conf.all.rp_filter\s*=\s*1$
                                                        Instance Int Exists 1
                                                        Line String Exists net.ipv4.conf.all.rp_filter=1
                                                        Text String Exists net.ipv4.conf.all.rp_filter=1
                                                        Subexpression String Does not exist No Value
                                                        Windows View String Not collected No Value
                                                        Criterion: Ensure 'net.ipv4.conf.all.rp_filter' kernel parameter Equals 1 (int)
                                                        Existence Check: At Least One Exists
                                                        Item Check: All
                                                        Result: Fail
                                                        No matching system items were found.
                                                        Criterion: Ensure 'net.ipv4.conf.default.rp_filter' kernel parameter Equals 1 (int)
                                                        Existence Check: At Least One Exists
                                                        Item Check: All
                                                        Result: Fail
                                                        No matching system items were found.
                                                        Criterion: Ensure 'net.ipv4.conf.default.rp_filter' kernel parameter Equals 1 (int)
                                                        Existence Check: At Least One Exists
                                                        Item Check: All
                                                        Result: Pass
                                                        Textfilecontent Item
                                                        Name Type Status Value
                                                        Filepath String Exists /etc/sysctl.d/10-network-security.conf
                                                        Path String Exists /etc/sysctl.d
                                                        Filename String Exists 10-network-security.conf
                                                        Pattern String Exists ^\s*net.ipv4.conf.default.rp_filter\s*=\s*1$
                                                        Instance Int Exists 1
                                                        Line String Exists net.ipv4.conf.default.rp_filter=1
                                                        Text String Exists net.ipv4.conf.default.rp_filter=1
                                                        Subexpression String Does not exist No Value
                                                        Windows View String Not collected No Value
                                                        Criterion: Ensure 'net.ipv4.conf.default.rp_filter' kernel parameter Equals 1 (int)
                                                        Existence Check: At Least One Exists
                                                        Item Check: All
                                                        Result: Fail
                                                        No matching system items were found.


                                                        Show Rule Result XML

                                                        References:

                                                          CIS Controls V7.0:

                                                          • Control 5: Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers: -- More

                                                          Fail

                                                          3.3.9 Ensure IPv6 router advertisements are not accepted

                                                          Description:

                                                          This setting disables the system's ability to accept IPv6 router advertisements.

                                                          It is recommended that systems do not accept router advertisements as they could be tricked into routing traffic to compromised machines. Setting hard routes within the system (usually a single default route to a trusted router) protects the system from bad routes.

                                                          IF IPv6 is enabled:

                                                          Set the following parameters in /etc/sysctl.conf or a /etc/sysctl.d/* file:

                                                          net.ipv6.conf.all.accept_ra = 0

                                                          net.ipv6.conf.default.accept_ra = 0

                                                          Run the following commands to set the active kernel parameters:

                                                          # sysctl -w net.ipv6.conf.all.accept_ra=0

                                                          # sysctl -w net.ipv6.conf.default.accept_ra=0

                                                          # sysctl -w net.ipv6.route.flush=1

                                                          Show Assessment Evidence
                                                          Complex Check
                                                          OR
                                                          Complex Check
                                                          AND
                                                          Criterion: Ensure 'net.ipv6.conf.all.accept_ra' kernel parameter Equals 0 (int)
                                                          Existence Check: At Least One Exists
                                                          Item Check: All
                                                          Result: Fail
                                                          No matching system items were found.
                                                          Criterion: Ensure 'net.ipv6.conf.all.accept_ra' kernel parameter Equals 0 (int)
                                                          Existence Check: At Least One Exists
                                                          Item Check: All
                                                          Result: Fail
                                                          No matching system items were found.
                                                          Criterion: Ensure 'net.ipv6.conf.all.accept_ra' kernel parameter Equals 0 (int)
                                                          Existence Check: At Least One Exists
                                                          Item Check: All
                                                          Result: Fail
                                                          No matching system items were found.
                                                          Criterion: Ensure 'net.ipv6.conf.default.accept_ra' kernel parameter Equals 0 (int)
                                                          Existence Check: At Least One Exists
                                                          Item Check: All
                                                          Result: Fail
                                                          No matching system items were found.
                                                          Criterion: Ensure 'net.ipv6.conf.default.accept_ra' kernel parameter Equals 0 (int)
                                                          Existence Check: At Least One Exists
                                                          Item Check: All
                                                          Result: Fail
                                                          No matching system items were found.
                                                          Criterion: Ensure 'net.ipv6.conf.default.accept_ra' kernel parameter Equals 0 (int)
                                                          Existence Check: At Least One Exists
                                                          Item Check: All
                                                          Result: Fail
                                                          No matching system items were found.
                                                          Script: sce/ipv6_disabled_v2.sh
                                                          Result: Fail
                                                          Exit Value: 102
                                                          Output:
                                                          • IPv6 is enabled on the system
                                                          No error lines were collected.


                                                          Show Rule Result XML

                                                          References:

                                                            CIS Controls V7.0:

                                                            • Control 5: Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers: -- More

                                                            3.4 Uncommon Network Protocols

                                                            The Linux kernel modules support several network protocols that are not commonly used. If these protocols are not needed, it is recommended that they be disabled in the kernel.

                                                            Note: This should not be considered a comprehensive list of uncommon network protocols, you may wish to consider additions to those listed here for your environment.

                                                            3.5 Firewall Configuration

                                                            A firewall is a set of rules. When a data packet moves into or out of a protected network space, its contents (in particular, information about its origin, target, and the protocol it plans to use) are tested against the firewall rules to see if it should be allowed through

                                                            To provide a Host Based Firewall, the Linux kernel includes support for:

                                                            • Netfilter - A set of hooks inside the Linux kernel that allows kernel modules to register callback functions with the network stack. A registered callback function is then called back for every packet that traverses the respective hook within the network stack. Includes the ip_tables, ip6_tables, arp_tables, and ebtables kernel modules. These modules are some of the significant parts of the Netfilter hook system.
                                                            • nftables - A subsystem of the Linux kernel providing filtering and classification of network packets/datagrams/frames. nftables is supposed to replace certain parts of Netfilter, while keeping and reusing most of it. nftables utilizes the building blocks of the Netfilter infrastructure, such as the existing hooks into the networking stack, connection tracking system, userspace queueing component, and logging subsystem. Is available in Linux kernels 3.13 and newer .

                                                            In order to configure firewall rules for Netfilter or nftables, a firewall utility needs to be installed. Guidance has been included for the following firewall utilities:

                                                            • UncomplicatedFirewall (ufw) - Provides firewall features by acting as a front-end for the Linux kernel's netfilter framework via the iptables backend. ufw supports both IPv4 and IPv6 networks
                                                            • nftables - Includes the nft utility for configuration of the nftables subsystem of the Linux kernel
                                                            • iptables - Includes the iptables, ip6tables, arptables and ebtables utilities for configuration Netfilter and the ip_tables, ip6_tables, arp_tables, and ebtables kernel modules.

                                                            Notes:

                                                            • Only one method should be used to configure a firewall on the system. Use of more than one method could produce unexpected results
                                                            • This section is intended only to ensure the resulting firewall rules are in place, not how they are configured

                                                            3.5.1 Configure UncomplicatedFirewall

                                                            If nftables or iptables are being used in your environment, please follow the guidance in their respective section and pass-over the guidance in this section.

                                                            Uncomplicated Firewall (UFW) is a program for managing a netfilter firewall designed to be easy to use.

                                                            • Uses a command-line interface consisting of a small number of simple commands
                                                            • Uses iptables for configuration
                                                            • Rules are processed until first matching rule. The first matching rule will be applied.

                                                            Notes:

                                                            • Configuration of a live system's firewall directly over a remote connection will often result in being locked out
                                                            • Rules should be ordered so that ALLOW rules come before DENY rules.
                                                            Fail

                                                            3.5.1.1 Ensure ufw is installed

                                                            Description:

                                                            The Uncomplicated Firewall (ufw) is a frontend for iptables and is particularly well-suited for host-based firewalls. ufw provides a framework for managing netfilter, as well as a command-line interface for manipulating the firewall

                                                            A firewall utility is required to configure the Linux kernel's netfilter framework via the iptables or nftables back-end.

                                                            The Linux kernel's netfilter framework host-based firewall can protect against threats originating from within a corporate network to include malicious mobile code and poorly configured software on a host.

                                                            Note: Only one firewall utility should be installed and configured. UFW is dependent on the iptables package

                                                            Run the following command to install Uncomplicated Firewall (UFW):

                                                            apt install ufw

                                                            Show Assessment Evidence
                                                            Complex Check
                                                            OR
                                                            Criterion: Ensure package name equals 'ufw' is installed
                                                            Existence Check: At Least One Exists
                                                            Item Check: All
                                                            Result: Fail
                                                            No matching system items were found.
                                                            Script: sce/no_ufw.sh
                                                            Result: Fail
                                                            Exit Value: 102
                                                            Output:
                                                            • Both IPTables and NFTables are not configured
                                                            No error lines were collected.


                                                            Show Rule Result XML

                                                            References:

                                                              CIS Controls V7.0:

                                                              • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More

                                                              Fail

                                                              3.5.1.3 Ensure ufw service is enabled

                                                              Description:

                                                              UncomplicatedFirewall (ufw) is a frontend for iptables. ufw provides a framework for managing netfilter, as well as a command-line and available graphical user interface for manipulating the firewall.

                                                              Notes:

                                                              • When running ufw enable or starting ufw via its initscript, ufw will flush its chains. This is required so ufw can maintain a consistent state, but it may drop existing connections (eg ssh). ufw does support adding rules before enabling the firewall.
                                                              • Run the following command before running ufw enable .
                                                              # ufw allow proto tcp from any to any port 22
                                                              • The rules will still be flushed, but the ssh port will be open after enabling the firewall. Please note that once ufw is 'enabled', ufw will not flush the chains when adding or removing rules (but will when modifying a rule or changing the default policy)
                                                              • By default, ufw will prompt when enabling the firewall while running under ssh. This can be disabled by using ufw --force enable

                                                              The ufw service must be enabled and running in order for ufw to protect the system

                                                              Run the following command to enable ufw:

                                                              # ufw enable

                                                              Impact:

                                                              Changing firewall settings while connected over network can result in being locked out of the system.

                                                              Show Assessment Evidence
                                                              Complex Check
                                                              OR
                                                              Script: sce/ufw_enabled.sh
                                                              Result: Fail
                                                              Exit Value: 102
                                                              Output:
                                                              • Failed. UFW status is: "UFW is not installed"
                                                              No error lines were collected.
                                                              Script: sce/no_ufw.sh
                                                              Result: Fail
                                                              Exit Value: 102
                                                              Output:
                                                              • Both IPTables and NFTables are not configured
                                                              No error lines were collected.


                                                              Show Rule Result XML

                                                              References:

                                                              • URL: http://manpages.ubuntu.com/manpages/precise/en/man8/ufw.8.html

                                                              CIS Controls V7.0:

                                                              • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More

                                                              Fail

                                                              3.5.1.4 Ensure ufw loopback traffic is configured

                                                              Description:

                                                              Configure the loopback interface to accept traffic. Configure all other interfaces to deny traffic to the loopback network (127.0.0.0/8 for IPv4 and ::1/128 for IPv6).

                                                              Loopback traffic is generated between processes on machine and is typically critical to operation of the system. The loopback interface is the only place that loopback network (127.0.0.0/8 for IPv4 and ::1/128 for IPv6) traffic should be seen, all other interfaces should ignore traffic on this network as an anti-spoofing measure.

                                                              Run the following commands to implement the loopback rules:

                                                              # ufw allow in on lo

                                                              # ufw allow out on lo

                                                              # ufw deny in from 127.0.0.0/8

                                                              # ufw deny in from ::1

                                                              Show Assessment Evidence
                                                              Complex Check
                                                              OR
                                                              Complex Check
                                                              AND
                                                              Complex Check
                                                              OR
                                                              Script: sce/ufw_status.sh
                                                              Result: Fail
                                                              Exit Value: 102
                                                              Output:
                                                              • Missing ufw rule.
                                                              Errors:
                                                              • /root/Assessor-CLI/sce/ufw_status.sh: line 10: ufw: command not found
                                                              Script: sce/ipv6_disabled_v2.sh
                                                              Result: Fail
                                                              Exit Value: 102
                                                              Output:
                                                              • IPv6 is enabled on the system
                                                              No error lines were collected.
                                                              Script: sce/ufw_status.sh
                                                              Result: Fail
                                                              Exit Value: 102
                                                              Output:
                                                              • Missing ufw rule.
                                                              Errors:
                                                              • /root/Assessor-CLI/sce/ufw_status.sh: line 10: ufw: command not found
                                                              Script: sce/no_ufw.sh
                                                              Result: Fail
                                                              Exit Value: 102
                                                              Output:
                                                              • Both IPTables and NFTables are not configured
                                                              No error lines were collected.


                                                              Show Rule Result XML

                                                              References:

                                                                CIS Controls V7.0:

                                                                • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More

                                                                Fail

                                                                3.5.1.7 Ensure ufw default deny firewall policy

                                                                Description:

                                                                A default deny policy on connections ensures that any unconfigured network usage will be rejected.

                                                                Note: Any port or protocol without a explicit allow before the default deny will be blocked

                                                                With a default accept policy the firewall will accept any packet that is not configured to be denied. It is easier to white list acceptable usage than to black list unacceptable usage.

                                                                Run the following commands to implement a default deny policy:

                                                                # ufw default deny incoming



                                                                # ufw default deny outgoing



                                                                # ufw default deny routed

                                                                Impact:

                                                                Any port and protocol not explicitly allowed will be blocked. The following rules should be considered before applying the default deny.

                                                                ufw allow git

                                                                ufw allow in http

                                                                ufw allow in https

                                                                ufw allow out 53

                                                                ufw logging on

                                                                Show Assessment Evidence
                                                                Complex Check
                                                                OR
                                                                Complex Check
                                                                AND
                                                                Complex Check
                                                                AND
                                                                Script: sce/ufw_status.sh
                                                                Result: Fail
                                                                Exit Value: 102
                                                                Output:
                                                                • Missing ufw rule.
                                                                Errors:
                                                                • /root/Assessor-CLI/sce/ufw_status.sh: line 10: ufw: command not found
                                                                Script: sce/ufw_status.sh
                                                                Result: Fail
                                                                Exit Value: 102
                                                                Output:
                                                                • Missing ufw rule.
                                                                Errors:
                                                                • /root/Assessor-CLI/sce/ufw_status.sh: line 10: ufw: command not found
                                                                Script: sce/ufw_status.sh
                                                                Result: Fail
                                                                Exit Value: 102
                                                                Output:
                                                                • Missing ufw rule.
                                                                Errors:
                                                                • /root/Assessor-CLI/sce/ufw_status.sh: line 10: ufw: command not found
                                                                Script: sce/no_ufw.sh
                                                                Result: Fail
                                                                Exit Value: 102
                                                                Output:
                                                                • Both IPTables and NFTables are not configured
                                                                No error lines were collected.


                                                                Show Rule Result XML

                                                                References:

                                                                  CIS Controls V7.0:

                                                                  • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More

                                                                  3.5.2 Configure nftables

                                                                  If Uncomplicated Firewall (UFW) or iptables are being used in your environment, please follow the guidance in their respective section and pass-over the guidance in this section.

                                                                  nftables is a subsystem of the Linux kernel providing filtering and classification of network packets/datagrams/frames and is the successor to iptables. The biggest change with the successor nftables is its simplicity. With iptables, we have to configure every single rule and use the syntax which can be compared with normal commands. With nftables, the simpler syntax, much like BPF (Berkely Packet Filter) means shorter lines and less repetition. Support for nftables should also be compiled into the kernel, together with the related nftables modules. Please ensure that your kernel supports nf_tables before choosing this option.

                                                                  Notes:

                                                                  • This section broadly assumes starting with an empty nftables firewall ruleset (established by flushing the rules with nft flush ruleset).
                                                                  • Remediation steps included only affect the live system, you will also need to configure your default firewall configuration to apply on boot.
                                                                  • Configuration of a live systems firewall directly over a remote connection will often result in being locked out. It is advised to have a known good firewall configuration set to run on boot and to configure an entire firewall structure in a script that is then run and tested before saving to boot.

                                                                  The following will implement the firewall rules of this section and open ICMP, IGMP, and port 22(ssh) from anywhere. Opening the ports for ICMP, IGMP, and port 22(ssh) needs to be updated in accordance with local site policy. Allow port 22(ssh) needs to be updated to only allow systems requiring ssh connectivity to connect, as per site policy.

                                                                  Save the script bellow as /etc/nftables.rules

                                                                  #!/sbin/nft -f



                                                                  # This nftables.rules config should be saved as /etc/nftables.rules

                                                                  # flush nftables rulesset

                                                                  flush ruleset

                                                                  # Load nftables ruleset

                                                                  # nftables config with inet table named filter

                                                                  table inet filter {

                                                                  # Base chain for input hook named input (Filters inbound network packets)

                                                                  chain input {

                                                                  type filter hook input priority 0; policy drop;



                                                                  # Ensure loopback traffic is configured

                                                                  iif "lo" accept

                                                                  ip saddr 127.0.0.0/8 counter packets 0 bytes 0 drop

                                                                  ip6 saddr ::1 counter packets 0 bytes 0 drop



                                                                  # Ensure established connections are configured

                                                                  ip protocol tcp ct state established accept

                                                                  ip protocol udp ct state established accept

                                                                  ip protocol icmp ct state established accept



                                                                  # Accept port 22(SSH) traffic from anywhere

                                                                  tcp dport ssh accept



                                                                  # Accept ICMP and IGMP from anywhere

                                                                  icmpv6 type { destination-unreachable, packet-too-big, time-exceeded, parameter-problem, mld-listener-query, mld-listener-report, mld-listener-done, nd-router-solicit, nd-router-advert, nd-neighbor-solicit, nd-neighbor-advert, ind-neighbor-solicit, ind-neighbor-advert, mld2-listener-report } accept

                                                                  icmp type { destination-unreachable, router-advertisement, router-solicitation, time-exceeded, parameter-problem } accept

                                                                  ip protocol igmp accept

                                                                  }



                                                                  # Base chain for hook forward named forward (Filters forwarded network packets)

                                                                  chain forward {

                                                                  type filter hook forward priority 0; policy drop;

                                                                  }



                                                                  # Base chain for hook output named output (Filters outbount network packets)

                                                                  chain output {

                                                                  type filter hook output priority 0; policy drop;

                                                                  # Ensure outbound and established connections are configured

                                                                  ip protocol tcp ct state established,related,new accept

                                                                  ip protocol udp ct state established,related,new accept

                                                                  ip protocol icmp ct state established,related,new accept

                                                                  }

                                                                  }

                                                                  Run the following command to load the file into nftables

                                                                  # nft -f /etc/nftables.rules

                                                                  All changes in the nftables subsections are temporary.

                                                                  To make these changes permanent:

                                                                  Run the following command to create the nftables.rules file

                                                                  nft list ruleset > /etc/nftables.rules

                                                                  Add the following line to /etc/nftables.conf

                                                                  include "/etc/nftables.rules"
                                                                  Fail

                                                                  3.5.2.1 Ensure nftables is installed

                                                                  Description:

                                                                  nftables provides a new in-kernel packet classification framework that is based on a network-specific Virtual Machine (VM) and a new nft userspace command line tool. nftables reuses the existing Netfilter subsystems such as the existing hook infrastructure, the connection tracking system, NAT, userspace queuing and logging subsystem.

                                                                  Notes:

                                                                  • nftables is available in Linux kernel 3.13 and newer
                                                                  • Only one firewall utility should be installed and configured
                                                                  • Changing firewall settings while connected over the network can result in being locked out of the system

                                                                  nftables is a subsystem of the Linux kernel that can protect against threats originating from within a corporate network to include malicious mobile code and poorly configured software on a host.

                                                                  Run the following command to install nftables :

                                                                  # apt install nftables

                                                                  Show Assessment Evidence
                                                                  Complex Check
                                                                  OR
                                                                  Criterion: Ensure package name equals 'nftables' is installed
                                                                  Existence Check: At Least One Exists
                                                                  Item Check: All
                                                                  Result: Fail
                                                                  No matching system items were found.
                                                                  Script: sce/deb_no_nftables.sh
                                                                  Result: Fail
                                                                  Exit Value: 102
                                                                  Output:
                                                                  • UFW is not configured
                                                                  • IPTables is not configured
                                                                  No error lines were collected.


                                                                  Show Rule Result XML

                                                                  References:

                                                                    CIS Controls V7.0:

                                                                    • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More

                                                                    Fail

                                                                    3.5.2.4 Ensure a nftables table exists

                                                                    Description:

                                                                    Tables hold chains. Each table only has one address family and only applies to packets of this family. Tables can have one of five families.

                                                                    nftables doesn't have any default tables. Without a table being build, nftables will not filter network traffic.

                                                                    Run the following command to create a table in nftables

                                                                    # nft create table inet <table name>

                                                                    Example:

                                                                    # nft create table inet filter

                                                                    Impact:

                                                                    Adding rules to a running nftables can cause loss of connectivity to the system

                                                                    Show Assessment Evidence
                                                                    Complex Check
                                                                    OR
                                                                    Script: sce/nft_tables.sh
                                                                    Result: Fail
                                                                    Exit Value: 102
                                                                    Output:
                                                                    • Missing nftables rule.
                                                                    Errors:
                                                                    • /root/Assessor-CLI/sce/nft_tables.sh: line 12: nft: command not found
                                                                    Script: sce/deb_no_nftables.sh
                                                                    Result: Fail
                                                                    Exit Value: 102
                                                                    Output:
                                                                    • UFW is not configured
                                                                    • IPTables is not configured
                                                                    No error lines were collected.


                                                                    Show Rule Result XML

                                                                    References:

                                                                      CIS Controls V7.0:

                                                                      • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More

                                                                      Fail

                                                                      3.5.2.5 Ensure nftables base chains exist

                                                                      Description:

                                                                      Chains are containers for rules. They exist in two kinds, base chains and regular chains. A base chain is an entry point for packets from the networking stack, a regular chain may be used as jump target and is used for better rule organization.

                                                                      If a base chain doesn't exist with a hook for input, forward, and delete, packets that would flow through those chains will not be touched by nftables.

                                                                      Run the following command to create the base chains:

                                                                      # nft create chain inet <table name> <base chain name> { type filter hook <(input|forward|output)> priority 0 \; }

                                                                      Example:

                                                                      # nft create chain inet filter input { type filter hook input priority 0 \; }



                                                                      # nft create chain inet filter forward { type filter hook forward priority 0 \; }



                                                                      # nft create chain inet filter output { type filter hook output priority 0 \; }

                                                                      Impact:

                                                                      If configuring nftables over ssh, creating a base chain with a policy of drop will cause loss of connectivity.

                                                                      Ensure that a rule allowing ssh has been added to the base chain prior to setting the base chain's policy to drop

                                                                      Show Assessment Evidence
                                                                      Complex Check
                                                                      OR
                                                                      Complex Check
                                                                      AND
                                                                      Complex Check
                                                                      AND
                                                                      Script: sce/nft_ruleset.sh
                                                                      Result: Fail
                                                                      Exit Value: 102
                                                                      Output:
                                                                      • Missing nftables rule.
                                                                      Errors:
                                                                      • /root/Assessor-CLI/sce/nft_ruleset.sh: line 11: nft: command not found
                                                                      Script: sce/nft_ruleset.sh
                                                                      Result: Fail
                                                                      Exit Value: 102
                                                                      Output:
                                                                      • Missing nftables rule.
                                                                      Errors:
                                                                      • /root/Assessor-CLI/sce/nft_ruleset.sh: line 11: nft: command not found
                                                                      Script: sce/nft_ruleset.sh
                                                                      Result: Fail
                                                                      Exit Value: 102
                                                                      Output:
                                                                      • Missing nftables rule.
                                                                      Errors:
                                                                      • /root/Assessor-CLI/sce/nft_ruleset.sh: line 11: nft: command not found
                                                                      Script: sce/deb_no_nftables.sh
                                                                      Result: Fail
                                                                      Exit Value: 102
                                                                      Output:
                                                                      • UFW is not configured
                                                                      • IPTables is not configured
                                                                      No error lines were collected.


                                                                      Show Rule Result XML

                                                                      References:

                                                                        CIS Controls V7.0:

                                                                        • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More

                                                                        Fail

                                                                        3.5.2.6 Ensure nftables loopback traffic is configured

                                                                        Description:

                                                                        Configure the loopback interface to accept traffic. Configure all other interfaces to deny traffic to the loopback network

                                                                        Loopback traffic is generated between processes on machine and is typically critical to operation of the system. The loopback interface is the only place that loopback network traffic should be seen, all other interfaces should ignore traffic on this network as an anti-spoofing measure.

                                                                        Run the following commands to implement the loopback rules:

                                                                        # nft add rule inet filter input iif lo accept # nft create rule inet filter input ip saddr 127.0.0.0/8 counter drop

                                                                        IF IPv6 is enabled on the system:

                                                                        Run the following command to implement the IPv6 loopback rule:

                                                                        # nft add rule inet filter input ip6 saddr ::1 counter drop

                                                                        Show Assessment Evidence
                                                                        Complex Check
                                                                        OR
                                                                        Script: sce/nft_loopback.sh
                                                                        Result: Fail
                                                                        Exit Value: 102
                                                                        Output:
                                                                        • "iif "lo" accept" is not set
                                                                        • Packets sourced from "127.0.0.1" are not set to drop
                                                                        • IPv6 is enabled, but packets sourced from "::1" are not set to drop
                                                                        No error lines were collected.
                                                                        Script: sce/deb_no_nftables.sh
                                                                        Result: Fail
                                                                        Exit Value: 102
                                                                        Output:
                                                                        • UFW is not configured
                                                                        • IPTables is not configured
                                                                        No error lines were collected.


                                                                        Show Rule Result XML

                                                                        References:

                                                                          CIS Controls V7.0:

                                                                          • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More

                                                                          Fail

                                                                          3.5.2.8 Ensure nftables default deny firewall policy

                                                                          Description:

                                                                          Base chain policy is the default verdict that will be applied to packets reaching the end of the chain.

                                                                          There are two policies: accept (Default) and drop. If the policy is set to accept , the firewall will accept any packet that is not configured to be denied and the packet will continue transversing the network stack.

                                                                          It is easier to white list acceptable usage than to black list unacceptable usage.

                                                                          Note: Changing firewall settings while connected over network can result in being locked out of the system.

                                                                          Run the following command for the base chains with the input, forward, and output hooks to implement a default DROP policy:

                                                                          # nft chain <table family> <table name> <chain name> { policy drop \; }

                                                                          Example:

                                                                          # nft chain inet filter input { policy drop \; }



                                                                          # nft chain inet filter forward { policy drop \; }



                                                                          # nft chain inet filter output { policy drop \; }

                                                                          Impact:

                                                                          If configuring nftables over ssh, creating a base chain with a policy of drop will cause loss of connectivity.

                                                                          Ensure that a rule allowing ssh has been added to the base chain prior to setting the base chain's policy to drop

                                                                          Show Assessment Evidence
                                                                          Complex Check
                                                                          OR
                                                                          Complex Check
                                                                          AND
                                                                          Complex Check
                                                                          AND
                                                                          Script: sce/nft_ruleset_drop.sh
                                                                          Result: Fail
                                                                          Exit Value: 102
                                                                          Output:
                                                                          • "input" basechain does not have a default drop policy
                                                                          Errors:
                                                                          • /root/Assessor-CLI/sce/nft_ruleset_drop.sh: line 13: nft: command not found
                                                                          Script: sce/nft_ruleset_drop.sh
                                                                          Result: Fail
                                                                          Exit Value: 102
                                                                          Output:
                                                                          • "forward" basechain does not have a default drop policy
                                                                          Errors:
                                                                          • /root/Assessor-CLI/sce/nft_ruleset_drop.sh: line 13: nft: command not found
                                                                          Script: sce/nft_ruleset_drop.sh
                                                                          Result: Fail
                                                                          Exit Value: 102
                                                                          Output:
                                                                          • "output" basechain does not have a default drop policy
                                                                          Errors:
                                                                          • /root/Assessor-CLI/sce/nft_ruleset_drop.sh: line 13: nft: command not found
                                                                          Script: sce/deb_no_nftables.sh
                                                                          Result: Fail
                                                                          Exit Value: 102
                                                                          Output:
                                                                          • UFW is not configured
                                                                          • IPTables is not configured
                                                                          No error lines were collected.


                                                                          Show Rule Result XML

                                                                          References:

                                                                          • URL: Manual Page nft

                                                                          CIS Controls V7.0:

                                                                          • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More

                                                                          Fail

                                                                          3.5.2.9 Ensure nftables service is enabled

                                                                          Description:

                                                                          The nftables service allows for the loading of nftables rulesets during boot, or starting on the nftables service

                                                                          The nftables service restores the nftables rules from the rules files referenced in the /etc/nftables.conf file during boot or the starting of the nftables service

                                                                          Run the following command to enable the nftables service:

                                                                          # systemctl enable nftables

                                                                          Show Assessment Evidence
                                                                          Complex Check
                                                                          OR
                                                                          Criterion: Ensure standard service 'nftables' is enabled
                                                                          Existence Check: At Least One Exists
                                                                          Item Check: All
                                                                          Result: Fail
                                                                          Systemdunitproperty Item
                                                                          Name Type Status Value
                                                                          Unit String Exists nftables
                                                                          Property String Exists UnitFileState
                                                                          Value String Exists No Value
                                                                          Script: sce/deb_no_nftables.sh
                                                                          Result: Fail
                                                                          Exit Value: 102
                                                                          Output:
                                                                          • UFW is not configured
                                                                          • IPTables is not configured
                                                                          No error lines were collected.


                                                                          Show Rule Result XML

                                                                          References:

                                                                            CIS Controls V7.0:

                                                                            • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More

                                                                            Fail

                                                                            3.5.2.10 Ensure nftables rules are permanent

                                                                            Description:

                                                                            nftables is a subsystem of the Linux kernel providing filtering and classification of network packets/datagrams/frames.

                                                                            The nftables service reads the /etc/nftables.conf file for a nftables file or files to include in the nftables ruleset.

                                                                            A nftables ruleset containing the input, forward, and output base chains allow network traffic to be filtered.

                                                                            Changes made to nftables ruleset only affect the live system, you will also need to configure the nftables ruleset to apply on boot

                                                                            Edit the /etc/nftables.conf file and un-comment or add a line with include <Absolute path to nftables rules file> for each nftables file you want included in the nftables ruleset on boot

                                                                            Example:

                                                                            # vi /etc/nftables.conf

                                                                            Add the line:

                                                                            include "/etc/nftables.rules"

                                                                            Show Assessment Evidence
                                                                            Complex Check
                                                                            OR
                                                                            Criterion: Ensure at least one file named /etc/nftables.conf exists and matches pattern ^\s*include\s+\S+
                                                                            Existence Check: At Least One Exists
                                                                            Item Check: All
                                                                            Result: Fail
                                                                            No matching system items were found.
                                                                            Script: sce/deb_no_nftables.sh
                                                                            Result: Fail
                                                                            Exit Value: 102
                                                                            Output:
                                                                            • UFW is not configured
                                                                            • IPTables is not configured
                                                                            No error lines were collected.


                                                                            Show Rule Result XML

                                                                            References:

                                                                              CIS Controls V7.0:

                                                                              • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More

                                                                              3.5.3 Configure iptables

                                                                              If Uncomplicated Firewall (UFW) or nftables are being used in your environment, please follow the guidance in their respective section and pass-over the guidance in this section.

                                                                              IPtables is an application that allows a system administrator to configure the IPv4 and IPv6 tables, chains and rules provided by the Linux kernel firewall. While several methods of configuration exist this section is intended only to ensure the resulting IPtables rules are in place, not how they are configured. If IPv6 is in use in your environment, similar settings should be applied to the IP6tables as well.

                                                                              Note: Configuration of a live system's firewall directly over a remote connection will often result in being locked out

                                                                              3.5.3.1 Configure iptables software

                                                                              This section provides guidance for installing, enabling, removing, and disabling software packages necessary for using IPTables as the method for configuring and maintaining a Host Based Firewall on the system.

                                                                              Note: Using more than one method to configure and maintain a Host Based Firewall can cause unexpected results. If FirewallD or NFTables are being used for configuration and maintenance, this section should be skipped and the guidance in their respective section followed.

                                                                              Fail

                                                                              3.5.3.1.1 Ensure iptables packages are installed

                                                                              Description:

                                                                              iptables is a utility program that allows a system administrator to configure the tables provided by the Linux kernel firewall, implemented as different Netfilter modules, and the chains and rules it stores. Different kernel modules and programs are used for different protocols; iptables applies to IPv4, ip6tables to IPv6, arptables to ARP, and ebtables to Ethernet frames.

                                                                              A method of configuring and maintaining firewall rules is necessary to configure a Host Based Firewall.

                                                                              Run the following command to install iptables and iptables-persistent

                                                                              # apt install iptables iptables-persistent

                                                                              Show Assessment Evidence
                                                                              Complex Check
                                                                              OR
                                                                              Complex Check
                                                                              AND
                                                                              Criterion: Ensure package name equals 'iptables' is installed
                                                                              Existence Check: At Least One Exists
                                                                              Item Check: All
                                                                              Result: Pass
                                                                              Dpkginfo Item
                                                                              Name Type Status Value
                                                                              Name String Exists iptables
                                                                              Arch String Exists amd64
                                                                              Epoch String Exists (none)
                                                                              Release String Exists 2ubuntu2
                                                                              Version String Exists 1.6.1
                                                                              Evr Evr String Exists 0:1.6.1-2ubuntu2
                                                                              Criterion: Ensure package name equals 'iptables-persistent' is installed
                                                                              Existence Check: At Least One Exists
                                                                              Item Check: All
                                                                              Result: Fail
                                                                              No matching system items were found.
                                                                              Script: sce/deb_no_iptables.sh
                                                                              Result: Fail
                                                                              Exit Value: 102
                                                                              Output:
                                                                              • Failed:
                                                                              • UFW is not configured on the system
                                                                              • NFTables is not configured on the system
                                                                              No error lines were collected.


                                                                              Show Rule Result XML

                                                                              References:

                                                                                CIS Controls V7.0:

                                                                                • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More

                                                                                3.5.3.2 Configure IPv4 iptables

                                                                                Iptables is used to set up, maintain, and inspect the tables of IP packet filter rules in the Linux kernel. Several different tables may be defined. Each table contains a number of built-in chains and may also contain user-defined chains.

                                                                                Each chain is a list of rules which can match a set of packets. Each rule specifies what to do with a packet that matches. This is called a 'target', which may be a jump to a user-defined chain in the same table.

                                                                                Note: This section broadly assumes starting with an empty IPtables firewall ruleset (established by flushing the rules with iptables -F). Remediation steps included only affect the live system, you will also need to configure your default firewall configuration to apply on boot. Configuration of a live systems firewall directly over a remote connection will often result in being locked out. It is advised to have a known good firewall configuration set to run on boot and to configure an entire firewall structure in a script that is then run and tested before saving to boot. The following script will implement the firewall rules of this section and open port 22(ssh) from anywhere:

                                                                                #!/bin/bash



                                                                                # Flush IPtables rules

                                                                                iptables -F



                                                                                # Ensure default deny firewall policy

                                                                                iptables -P INPUT DROP

                                                                                iptables -P OUTPUT DROP

                                                                                iptables -P FORWARD DROP



                                                                                # Ensure loopback traffic is configured

                                                                                iptables -A INPUT -i lo -j ACCEPT

                                                                                iptables -A OUTPUT -o lo -j ACCEPT

                                                                                iptables -A INPUT -s 127.0.0.0/8 -j DROP



                                                                                # Ensure outbound and established connections are configured

                                                                                iptables -A OUTPUT -p tcp -m state --state NEW,ESTABLISHED -j ACCEPT

                                                                                iptables -A OUTPUT -p udp -m state --state NEW,ESTABLISHED -j ACCEPT

                                                                                iptables -A OUTPUT -p icmp -m state --state NEW,ESTABLISHED -j ACCEPT

                                                                                iptables -A INPUT -p tcp -m state --state ESTABLISHED -j ACCEPT

                                                                                iptables -A INPUT -p udp -m state --state ESTABLISHED -j ACCEPT

                                                                                iptables -A INPUT -p icmp -m state --state ESTABLISHED -j ACCEPT



                                                                                # Open inbound ssh(tcp port 22) connections

                                                                                iptables -A INPUT -p tcp --dport 22 -m state --state NEW -j ACCEPT
                                                                                Fail

                                                                                3.5.3.2.1 Ensure iptables default deny firewall policy

                                                                                Description:

                                                                                A default deny all policy on connections ensures that any unconfigured network usage will be rejected.

                                                                                Notes:

                                                                                • Changing firewall settings while connected over network can result in being locked out of the system
                                                                                • Remediation will only affect the active system firewall, be sure to configure the default policy in your firewall management to apply on boot as well

                                                                                With a default accept policy the firewall will accept any packet that is not configured to be denied. It is easier to white list acceptable usage than to black list unacceptable usage.

                                                                                Run the following commands to implement a default DROP policy:

                                                                                # iptables -P INPUT DROP

                                                                                # iptables -P OUTPUT DROP

                                                                                # iptables -P FORWARD DROP

                                                                                Show Assessment Evidence
                                                                                Complex Check
                                                                                OR
                                                                                Complex Check
                                                                                AND
                                                                                Complex Check
                                                                                AND
                                                                                Script: sce/iptables_chk.sh
                                                                                Result: Fail
                                                                                Exit Value: 102
                                                                                Output:
                                                                                • Missing iptables rule.
                                                                                No error lines were collected.
                                                                                Script: sce/iptables_chk.sh
                                                                                Result: Fail
                                                                                Exit Value: 102
                                                                                Output:
                                                                                • Missing iptables rule.
                                                                                No error lines were collected.
                                                                                Script: sce/iptables_chk.sh
                                                                                Result: Fail
                                                                                Exit Value: 102
                                                                                Output:
                                                                                • Missing iptables rule.
                                                                                No error lines were collected.
                                                                                Script: sce/deb_no_iptables.sh
                                                                                Result: Fail
                                                                                Exit Value: 102
                                                                                Output:
                                                                                • Failed:
                                                                                • UFW is not configured on the system
                                                                                • NFTables is not configured on the system
                                                                                No error lines were collected.


                                                                                Show Rule Result XML

                                                                                References:

                                                                                  CIS Controls V7.0:

                                                                                  • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More

                                                                                  Fail

                                                                                  3.5.3.2.2 Ensure iptables loopback traffic is configured

                                                                                  Description:

                                                                                  Configure the loopback interface to accept traffic. Configure all other interfaces to deny traffic to the loopback network (127.0.0.0/8).

                                                                                  Notes:

                                                                                  • Changing firewall settings while connected over network can result in being locked out of the system
                                                                                  • Remediation will only affect the active system firewall, be sure to configure the default policy in your firewall management to apply on boot as well

                                                                                  Loopback traffic is generated between processes on machine and is typically critical to operation of the system. The loopback interface is the only place that loopback network (127.0.0.0/8) traffic should be seen, all other interfaces should ignore traffic on this network as an anti-spoofing measure.

                                                                                  Run the following commands to implement the loopback rules:

                                                                                  # iptables -A INPUT -i lo -j ACCEPT

                                                                                  # iptables -A OUTPUT -o lo -j ACCEPT

                                                                                  # iptables -A INPUT -s 127.0.0.0/8 -j DROP

                                                                                  Show Assessment Evidence
                                                                                  Complex Check
                                                                                  OR
                                                                                  Complex Check
                                                                                  AND
                                                                                  Complex Check
                                                                                  AND
                                                                                  Script: sce/iptables_input.sh
                                                                                  Result: Fail
                                                                                  Exit Value: 102
                                                                                  Output:
                                                                                  • Missing iptables rule.
                                                                                  No error lines were collected.
                                                                                  Script: sce/iptables_input.sh
                                                                                  Result: Fail
                                                                                  Exit Value: 102
                                                                                  Output:
                                                                                  • Missing iptables rule.
                                                                                  No error lines were collected.
                                                                                  Script: sce/iptables_output.sh
                                                                                  Result: Fail
                                                                                  Exit Value: 102
                                                                                  Output:
                                                                                  • Missing iptables rule.
                                                                                  No error lines were collected.
                                                                                  Script: sce/deb_no_iptables.sh
                                                                                  Result: Fail
                                                                                  Exit Value: 102
                                                                                  Output:
                                                                                  • Failed:
                                                                                  • UFW is not configured on the system
                                                                                  • NFTables is not configured on the system
                                                                                  No error lines were collected.


                                                                                  Show Rule Result XML

                                                                                  References:

                                                                                    CIS Controls V7.0:

                                                                                    • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More

                                                                                    Fail

                                                                                    3.5.3.2.4 Ensure iptables firewall rules exist for all open ports

                                                                                    Description:

                                                                                    Any ports that have been opened on non-loopback addresses need firewall rules to govern traffic.

                                                                                    Note:

                                                                                    • Changing firewall settings while connected over network can result in being locked out of the system
                                                                                    • Remediation will only affect the active system firewall, be sure to configure the default policy in your firewall management to apply on boot as well
                                                                                    • The remediation command opens up the port to traffic from all sources. Consult iptables documentation and set any restrictions in compliance with site policy

                                                                                    Without a firewall rule configured for open ports default firewall policy will drop all packets to these ports.

                                                                                    For each port identified in the audit which does not have a firewall rule establish a proper rule for accepting inbound connections:

                                                                                    # iptables -A INPUT -p <protocol> --dport <port> -m state --state NEW -j ACCEPT

                                                                                    Show Assessment Evidence
                                                                                    Complex Check
                                                                                    OR
                                                                                    Script: sce/nix_iptables_openports_chk.sh
                                                                                    Result: Fail
                                                                                    Exit Value: 102
                                                                                    Output:
                                                                                    • FAILED: The following open port(s) dont have a firewall rule: "34437", "8472", "2379", "2380", "8080", "22", "34975", "8001"
                                                                                    No error lines were collected.
                                                                                    Script: sce/deb_no_iptables.sh
                                                                                    Result: Fail
                                                                                    Exit Value: 102
                                                                                    Output:
                                                                                    • Failed:
                                                                                    • UFW is not configured on the system
                                                                                    • NFTables is not configured on the system
                                                                                    No error lines were collected.


                                                                                    Show Rule Result XML

                                                                                    References:

                                                                                      CIS Controls V7.0:

                                                                                      • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More
                                                                                      • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More

                                                                                      3.5.3.3 Configure IPv6 ip6tables

                                                                                      Ip6tables is used to set up, maintain, and inspect the tables of IPv6 packet filter rules in the Linux kernel. Several different tables may be defined. Each table contains a number of built-in chains and may also contain user-defined chains. Each chain is a list of rules which can match a set of packets. Each rule specifies what to do with a packet that matches. This is called a `target', which may be a jump to a user-defined chain in the same table.

                                                                                      If IPv6 in enabled on the system, the ip6tables should be configured.

                                                                                      Note: This section broadly assumes starting with an empty ip6tables firewall ruleset (established by flushing the rules with ip6tables -F). Remediation steps included only affect the live system, you will also need to configure your default firewall configuration to apply on boot. Configuration of a live systems firewall directly over a remote connection will often result in being locked out. It is advised to have a known good firewall configuration set to run on boot and to configure an entire firewall structure in a script that is then run and tested before saving to boot.

                                                                                      The following script will implement the firewall rules of this section and open port 22(ssh) from anywhere:

                                                                                      #!/bin/bash



                                                                                      # Flush ip6tables rules

                                                                                      ip6tables -F



                                                                                      # Ensure default deny firewall policy

                                                                                      ip6tables -P INPUT DROP

                                                                                      ip6tables -P OUTPUT DROP

                                                                                      ip6tables -P FORWARD DROP



                                                                                      # Ensure loopback traffic is configured

                                                                                      ip6tables -A INPUT -i lo -j ACCEPT

                                                                                      ip6tables -A OUTPUT -o lo -j ACCEPT

                                                                                      ip6tables -A INPUT -s ::1 -j DROP



                                                                                      # Ensure outbound and established connections are configured

                                                                                      ip6tables -A OUTPUT -p tcp -m state --state NEW,ESTABLISHED -j ACCEPT

                                                                                      ip6tables -A OUTPUT -p udp -m state --state NEW,ESTABLISHED -j ACCEPT

                                                                                      ip6tables -A OUTPUT -p icmp -m state --state NEW,ESTABLISHED -j ACCEPT

                                                                                      ip6tables -A INPUT -p tcp -m state --state ESTABLISHED -j ACCEPT

                                                                                      ip6tables -A INPUT -p udp -m state --state ESTABLISHED -j ACCEPT

                                                                                      ip6tables -A INPUT -p icmp -m state --state ESTABLISHED -j ACCEPT



                                                                                      # Open inbound ssh(tcp port 22) connections

                                                                                      ip6tables -A INPUT -p tcp --dport 22 -m state --state NEW -j ACCEPT
                                                                                      Fail

                                                                                      3.5.3.3.1 Ensure ip6tables default deny firewall policy

                                                                                      Description:

                                                                                      A default deny all policy on connections ensures that any unconfigured network usage will be rejected.

                                                                                      Note:

                                                                                      • Changing firewall settings while connected over network can result in being locked out of the system
                                                                                      • Remediation will only affect the active system firewall, be sure to configure the default policy in your firewall management to apply on boot as well

                                                                                      With a default accept policy the firewall will accept any packet that is not configured to be denied. It is easier to white list acceptable usage than to black list unacceptable usage.

                                                                                      Run the following commands to implement a default DROP policy:

                                                                                      # ip6tables -P INPUT DROP

                                                                                      # ip6tables -P OUTPUT DROP

                                                                                      # ip6tables -P FORWARD DROP

                                                                                      Show Assessment Evidence
                                                                                      Complex Check
                                                                                      OR
                                                                                      Complex Check
                                                                                      OR
                                                                                      Complex Check
                                                                                      AND
                                                                                      Complex Check
                                                                                      AND
                                                                                      Script: sce/ip6tables_chk.sh
                                                                                      Result: Fail
                                                                                      Exit Value: 102
                                                                                      Output:
                                                                                      • Missing ip6tables rule.
                                                                                      No error lines were collected.
                                                                                      Script: sce/ip6tables_chk.sh
                                                                                      Result: Fail
                                                                                      Exit Value: 102
                                                                                      Output:
                                                                                      • Missing ip6tables rule.
                                                                                      No error lines were collected.
                                                                                      Script: sce/ip6tables_chk.sh
                                                                                      Result: Fail
                                                                                      Exit Value: 102
                                                                                      Output:
                                                                                      • Missing ip6tables rule.
                                                                                      No error lines were collected.
                                                                                      Script: sce/ipv6_disabled_v2.sh
                                                                                      Result: Fail
                                                                                      Exit Value: 102
                                                                                      Output:
                                                                                      • IPv6 is enabled on the system
                                                                                      No error lines were collected.
                                                                                      Script: sce/deb_no_iptables.sh
                                                                                      Result: Fail
                                                                                      Exit Value: 102
                                                                                      Output:
                                                                                      • Failed:
                                                                                      • UFW is not configured on the system
                                                                                      • NFTables is not configured on the system
                                                                                      No error lines were collected.


                                                                                      Show Rule Result XML

                                                                                      References:

                                                                                        CIS Controls V7.0:

                                                                                        • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More

                                                                                        Fail

                                                                                        3.5.3.3.4 Ensure ip6tables firewall rules exist for all open ports

                                                                                        Description:

                                                                                        Any ports that have been opened on non-loopback addresses need firewall rules to govern traffic.

                                                                                        Note:

                                                                                        • Changing firewall settings while connected over network can result in being locked out of the system
                                                                                        • Remediation will only affect the active system firewall, be sure to configure the default policy in your firewall management to apply on boot as well
                                                                                        • The remediation command opens up the port to traffic from all sources. Consult iptables documentation and set any restrictions in compliance with site policy

                                                                                        Without a firewall rule configured for open ports default firewall policy will drop all packets to these ports.

                                                                                        For each port identified in the audit which does not have a firewall rule establish a proper rule for accepting inbound connections:

                                                                                        # ip6tables -A INPUT -p <protocol> --dport <port> -m state --state NEW -j ACCEPT

                                                                                        Show Assessment Evidence
                                                                                        Complex Check
                                                                                        OR
                                                                                        Complex Check
                                                                                        OR
                                                                                        Script: sce/nix_ip6tables_openports_chk.sh
                                                                                        Result: Fail
                                                                                        Exit Value: 102
                                                                                        Output:
                                                                                        • FAILED: The following open port(s) dont have a firewall rule: "10250", "6443", "10256", "22", "8888"
                                                                                        No error lines were collected.
                                                                                        Script: sce/ipv6_disabled_v2.sh
                                                                                        Result: Fail
                                                                                        Exit Value: 102
                                                                                        Output:
                                                                                        • IPv6 is enabled on the system
                                                                                        No error lines were collected.
                                                                                        Script: sce/deb_no_iptables.sh
                                                                                        Result: Fail
                                                                                        Exit Value: 102
                                                                                        Output:
                                                                                        • Failed:
                                                                                        • UFW is not configured on the system
                                                                                        • NFTables is not configured on the system
                                                                                        No error lines were collected.


                                                                                        Show Rule Result XML

                                                                                        References:

                                                                                          CIS Controls V7.0:

                                                                                          • Control 9: Limitation and Control of Network Ports, Protocols, and Services: -- More

                                                                                          4 Logging and Auditing

                                                                                          The items in this section describe how to configure logging, log monitoring, and auditing, using tools included in most distributions.

                                                                                          It is recommended that rsyslog be used for logging (with logwatch providing summarization) and auditd be used for auditing (with aureport providing summarization) to automatically monitor logs for intrusion attempts and other suspicious system behavior.

                                                                                          In addition to the local log files created by the steps in this section, it is also recommended that sites collect copies of their system logs on a secure, centralized log server via an encrypted connection. Not only does centralized logging help sites correlate events that may be occurring on multiple systems, but having a second copy of the system log information may be critical after a system compromise where the attacker has modified the local log files on the affected system(s). If a log correlation system is deployed, configure it to process the logs described in this section.

                                                                                          Because it is often necessary to correlate log information from many different systems (particularly after a security incident) it is recommended that the time be synchronized among systems and devices connected to the local network.

                                                                                          It is important that all logs described in this section be monitored on a regular basis and correlated to determine trends. A seemingly innocuous entry in one log could be more significant when compared to an entry in another log.

                                                                                          Note on log file permissions: There really isn't a "one size fits all" solution to the permissions on log files. Many sites utilize group permissions so that administrators who are in a defined security group, such as "wheel" do not have to elevate privileges to root in order to read log files. Also, if a third party log aggregation tool is used, it may need to have group permissions to read the log files, which is preferable to having it run setuid to root. Therefore, there are two remediation and audit steps for log file permissions. One is for systems that do not have a secured group method implemented that only permits root to read the log files ( root:root 600 ). The other is for sites that do have such a setup and are designated as root:securegrp 640 where securegrp is the defined security group (in some cases wheel ).

                                                                                          4.1 Configure System Accounting (auditd)

                                                                                          System auditing, through auditd , allows system administrators to monitor their systems such that they can detect unauthorized access or modification of data. By default, auditd will audit AppArmor AVC denials, system logins, account modifications, and authentication events. Events will be logged to /var/log/audit/audit.log . The recording of these events will use a modest amount of disk space on a system. If significantly more events are captured, additional on system or off system storage may need to be allocated.

                                                                                          Notes:

                                                                                          • The recommendations in this section implement an audit policy that produces large quantities of logged data
                                                                                          • In some environments it can be challenging to store or process these logs and as such they are marked as Level 2 for both Servers and Workstations
                                                                                          • Audit rules that have arch as a rule parameter:
                                                                                            • On 64 bit systems, you will need two rules, one for 64 bit and one for 32 bit
                                                                                            • On 32 bit systems, only the 32 bit rule is needed
                                                                                          • Several recommendations in this section filter based off of auid>=1000 for unprivileged non-system users. Some systems may have a non-default UID_MIN setting, consult the UID_MIN setting in /etc/login.defs to determine the UID_MIN setting for your system
                                                                                          • The audits in this section look for a key value. The key value may be different for the audit rules on your system. If a different key value, denoted by -k or key= is used on your system, please replace the grep <key_value> with the key value in use on your system
                                                                                          • Once all audit rules have been added to a file or files in the /etc/audit/rules.d/ directory, the auditd service must be re-started, or the system rebooted, for the new rules to be included

                                                                                          4.1.1 Ensure auditing is enabled

                                                                                          The capturing of system events provides system administrators with information to allow them to determine if unauthorized access to their system is occurring.

                                                                                          4.1.2 Configure Data Retention

                                                                                          When auditing, it is important to carefully configure the storage requirements for audit logs. By default, auditd will max out the log files at 5MB and retain only 4 copies of them. Older versions will be deleted. It is possible on a system that the 20 MBs of audit logs may fill up the system causing loss of audit data. While the recommendations here provide guidance, check your site policy for audit storage requirements.

                                                                                          4.2 Configure Logging

                                                                                          Logging services should be configured to prevent information leaks and to aggregate logs on a remote server so that they can be reviewed in the event of a system compromise and ease log analysis.

                                                                                          4.2.1 Configure rsyslog

                                                                                          The rsyslog software is recommended as a replacement for the syslogd daemon and provides improvements over syslogd , such as connection-oriented (i.e. TCP) transmission of logs, the option to log to database formats, and the encryption of log data en route to a central logging server.

                                                                                          Note: This section only applies if rsyslog is installed on the system.

                                                                                          Fail

                                                                                          4.2.1.1 Ensure rsyslog is installed

                                                                                          Description:

                                                                                          The rsyslog software is a recommended replacement to the original syslogd daemon which provide improvements over syslogd , such as connection-oriented (i.e. TCP) transmission of logs, the option to log to database formats, and the encryption of log data en route to a central logging server.

                                                                                          The security enhancements of rsyslog such as connection-oriented (i.e. TCP) transmission of logs, the option to log to database formats, and the encryption of log data en route to a central logging server) justify installing and configuring the package.

                                                                                          Install rsyslog:

                                                                                          # apt install rsyslog

                                                                                          Show Assessment Evidence
                                                                                          Complex Check
                                                                                          AND
                                                                                          Criterion: Ensure package name equals 'rsyslog' is installed
                                                                                          Existence Check: At Least One Exists
                                                                                          Item Check: All
                                                                                          Result: Fail
                                                                                          No matching system items were found.


                                                                                          Show Rule Result XML

                                                                                          References:

                                                                                            CIS Controls V7.0:

                                                                                            • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                                                                                            • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More

                                                                                            Fail

                                                                                            4.2.1.2 Ensure rsyslog Service is enabled

                                                                                            Description:

                                                                                            Once the rsyslog package is installed it needs to be activated.

                                                                                            If the rsyslog service is not activated the system may default to the syslogd service or lack logging instead.

                                                                                            Run the following commands to enable rsyslog :

                                                                                            # systemctl --now enable rsyslog

                                                                                            Show Assessment Evidence
                                                                                            Complex Check
                                                                                            AND
                                                                                            Criterion: Ensure standard service 'rsyslog' is enabled
                                                                                            Existence Check: At Least One Exists
                                                                                            Item Check: All
                                                                                            Result: Fail
                                                                                            Systemdunitproperty Item
                                                                                            Name Type Status Value
                                                                                            Unit String Exists rsyslog
                                                                                            Property String Exists UnitFileState
                                                                                            Value String Exists No Value


                                                                                            Show Rule Result XML

                                                                                            References:

                                                                                              CIS Controls V7.0:

                                                                                              • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                                                                                              • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More

                                                                                              Fail

                                                                                              4.2.1.4 Ensure rsyslog default file permissions configured

                                                                                              Description:

                                                                                              rsyslog will create logfiles that do not already exist on the system. This setting controls what permissions will be applied to these newly created files.

                                                                                              It is important to ensure that log files have the correct permissions to ensure that sensitive data is archived and protected.

                                                                                              Edit the /etc/rsyslog.conf and /etc/rsyslog.d/*.conf files and set every instance of $FileCreateMode to 0640 or more restrictive:

                                                                                              $FileCreateMode 0640

                                                                                              Show Assessment Evidence
                                                                                              Complex Check
                                                                                              OR
                                                                                              Criterion: Ensure at least one file named /etc/rsyslog.conf exists and matches pattern ^\s*\$FileCreateMode\s+0[6420][40]0\s*(\s+#.*)?$
                                                                                              Existence Check: At Least One Exists
                                                                                              Item Check: All
                                                                                              Result: Fail
                                                                                              No matching system items were found.
                                                                                              Criterion: Ensure at least one file(s) named ^.+\.conf$ in /etc/rsyslog.d/ exists and matches pattern ^\s*\$FileCreateMode\s+0[6420][40]0\s*(\s+#.*)?$
                                                                                              Existence Check: At Least One Exists
                                                                                              Item Check: At least one
                                                                                              Result: Fail
                                                                                              No matching system items were found.


                                                                                              Show Rule Result XML

                                                                                              References:

                                                                                              • URL: See the rsyslog.conf(5) man page for more information.

                                                                                              CIS Controls V7.0:

                                                                                              • Control 5: Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers: -- More

                                                                                              Fail

                                                                                              4.2.1.5 Ensure rsyslog is configured to send logs to a remote log host

                                                                                              Description:

                                                                                              The rsyslog utility supports the ability to send logs it gathers to a remote log host running syslogd(8) or to receive messages from remote hosts, reducing administrative overhead.

                                                                                              Storing log data on a remote host protects log integrity from local attacks. If an attacker gains root access on the local system, they could tamper with or remove log data that is stored on the local system

                                                                                              Note: Ensure that the selection of logfiles being sent follows local site policy

                                                                                              Edit the /etc/rsyslog.conf and /etc/rsyslog.d/*.conf files and add one of the following lines:

                                                                                              Newer syntax:

                                                                                              <files to sent to the remote log server> action(type="omfwd" target="<FQDN or ip of loghost>" port="<port number>" protocol="tcp"

                                                                                              action.resumeRetryCount="<number of re-tries>"

                                                                                              queue.type="LinkedList" queue.size=<number of messages to queue>")

                                                                                              Example:

                                                                                              *.* action(type="omfwd" target="192.168.2.100" port="514" protocol="tcp"

                                                                                              action.resumeRetryCount="100"

                                                                                              queue.type="LinkedList" queue.size="1000")

                                                                                              Older syntax:

                                                                                              *.* @@<FQDN or ip of loghost>

                                                                                              Example:

                                                                                              *.* @@192.168.2.100

                                                                                              Run the following command to reload the rsyslog configuration:

                                                                                              # systemctl restart rsyslog

                                                                                              Show Assessment Evidence
                                                                                              Complex Check
                                                                                              OR
                                                                                              Complex Check
                                                                                              OR
                                                                                              Complex Check
                                                                                              OR
                                                                                              Criterion: Ensure at least one file named /etc/rsyslog.conf exists and matches pattern ^\s*\*\.\*\s+\@
                                                                                              Existence Check: At Least One Exists
                                                                                              Item Check: All
                                                                                              Result: Fail
                                                                                              No matching system items were found.
                                                                                              Criterion: Ensure at least one file(s) named ^.+\.conf$ in /etc/rsyslog.d/ exists and matches pattern ^\s*\*\.\*\s+\@
                                                                                              Existence Check: At Least One Exists
                                                                                              Item Check: At least one
                                                                                              Result: Fail
                                                                                              No matching system items were found.
                                                                                              Criterion: Ensure at least one file named /etc/rsyslog.conf exists and matches pattern ^\s*([^#]+\s+)?action\(([^#]+\s+)?\btarget="?[^#"]+"?\b
                                                                                              Existence Check: At Least One Exists
                                                                                              Item Check: All
                                                                                              Result: Fail
                                                                                              No matching system items were found.
                                                                                              Criterion: Ensure at least one file(s) named ^.+\.conf$ in /etc/rsyslog.d/ exists and matches pattern ^\s*([^#]+\s+)?action\(([^#]+\s+)?\btarget=\"?[^#"]+\"?\b
                                                                                              Existence Check: At Least One Exists
                                                                                              Item Check: All
                                                                                              Result: Fail
                                                                                              No matching system items were found.


                                                                                              Show Rule Result XML

                                                                                              References:

                                                                                              • URL: See the rsyslog.conf(5) man page for more information.

                                                                                              CIS Controls V7.0:

                                                                                              • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                                                                                              • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More

                                                                                              4.2.2 Configure journald

                                                                                              systemd-journald is a system service that collects and stores logging data. It creates and maintains structured, indexed journals based on logging information that is received from a variety of sources: Kernel log messages, via kmsg

                                                                                              Any changes made to the systemd-journald configuration will require a re-start of systemd-journald

                                                                                              Fail

                                                                                              4.2.2.1 Ensure journald is configured to send logs to rsyslog

                                                                                              Description:

                                                                                              Data from journald may be stored in volatile memory or persisted locally on the server. Utilities exist to accept remote export of journald logs, however, use of the rsyslog service provides a consistent means of log collection and export.

                                                                                              Notes:

                                                                                              • This recommendation assumes that recommendation 4.2.1.5, "Ensure rsyslog is configured to send logs to a remote log host" has been implemented.
                                                                                              • As noted in the journald man pages, journald logs may be exported to rsyslog either through the process mentioned here, or through a facility like systemd-journald.service . There are trade-offs involved in each implementation, where ForwardToSyslog will immediately capture all events (and forward to an external log server, if properly configured), but may not capture all boot-up activities. Mechanisms such as systemd-journald.service , on the other hand, will record bootup events, but may delay sending the information to rsyslog, leading to the potential for log manipulation prior to export. Be aware of the limitations of all tools employed to secure a system.
                                                                                              • The main configuration file /etc/systemd/journald.conf is read before any of the custom *.conf files. If there are custom configs present, they override the main configuration parameters

                                                                                              Storing log data on a remote host protects log integrity from local attacks. If an attacker gains root access on the local system, they could tamper with or remove log data that is stored on the local system.

                                                                                              Edit the /etc/systemd/journald.conf file and add the following line:

                                                                                              ForwardToSyslog=yes

                                                                                              Show Assessment Evidence
                                                                                              Complex Check
                                                                                              AND
                                                                                              Criterion: Ensure at least one file named /etc/systemd/journald.conf exists and matches pattern ^\s*(?i)ForwardToSyslog\s*=\s*yes(\s+#.*)*$
                                                                                              Existence Check: At Least One Exists
                                                                                              Item Check: All
                                                                                              Result: Fail
                                                                                              No matching system items were found.


                                                                                              Show Rule Result XML

                                                                                              References:

                                                                                              • URL: https://github.com/konstruktoid/hardening/blob/master/systemd.adoc#etcsystemdjournaldconf

                                                                                              CIS Controls V7.0:

                                                                                              • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More

                                                                                              Fail

                                                                                              4.2.2.2 Ensure journald is configured to compress large log files

                                                                                              Description:

                                                                                              The journald system includes the capability of compressing overly large files to avoid filling up the system with logs or making the logs unmanageably large.

                                                                                              Note: The main configuration file /etc/systemd/journald.conf is read before any of the custom *.conf files. If there are custom configs present, they override the main configuration parameters

                                                                                              Uncompressed large files may unexpectedly fill a filesystem leading to resource unavailability. Compressing logs prior to write can prevent sudden, unexpected filesystem impacts.

                                                                                              Edit the /etc/systemd/journald.conf file and add the following line:

                                                                                              Compress=yes

                                                                                              Show Assessment Evidence
                                                                                              Complex Check
                                                                                              AND
                                                                                              Criterion: Ensure at least one file named /etc/systemd/journald.conf exists and matches pattern ^\s*(?i)Compress\s*=\s*yes(\s+#.*)*$
                                                                                              Existence Check: At Least One Exists
                                                                                              Item Check: All
                                                                                              Result: Fail
                                                                                              No matching system items were found.


                                                                                              Show Rule Result XML

                                                                                              References:

                                                                                              • URL: https://github.com/konstruktoid/hardening/blob/master/systemd.adoc#etcsystemdjournaldconf

                                                                                              CIS Controls V7.0:

                                                                                              • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More

                                                                                              Fail

                                                                                              4.2.2.3 Ensure journald is configured to write logfiles to persistent disk

                                                                                              Description:

                                                                                              Data from journald may be stored in volatile memory or persisted locally on the server. Logs in memory will be lost upon a system reboot. By persisting logs to local disk on the server they are protected from loss.

                                                                                              Note: The main configuration file /etc/systemd/journald.conf is read before any of the custom *.conf files. If there are custom configs present, they override the main configuration parameters

                                                                                              Writing log data to disk will provide the ability to forensically reconstruct events which may have impacted the operations or security of a system even after a system crash or reboot.

                                                                                              Edit the /etc/systemd/journald.conf file and add the following line:

                                                                                              Storage=persistent

                                                                                              Show Assessment Evidence
                                                                                              Complex Check
                                                                                              AND
                                                                                              Criterion: Ensure at least one file named /etc/systemd/journald.conf exists and matches pattern ^\s*(?i)Storage\s*=\s*persistent(\s+#.*)*$
                                                                                              Existence Check: At Least One Exists
                                                                                              Item Check: At least one
                                                                                              Result: Fail
                                                                                              No matching system items were found.


                                                                                              Show Rule Result XML

                                                                                              References:

                                                                                              • URL: https://github.com/konstruktoid/hardening/blob/master/systemd.adoc#etcsystemdjournaldconf

                                                                                              CIS Controls V7.0:

                                                                                              • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More
                                                                                              • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More

                                                                                              Fail

                                                                                              4.2.3 Ensure permissions on all logfiles are configured

                                                                                              Description:

                                                                                              Log files stored in /var/log/ contain logged information from many services on the system, or on log hosts others as well.

                                                                                              Note: You may also need to change the configuration for your logging software or services for any logs that had incorrect permissions.

                                                                                              It is important to ensure that log files have the correct permissions to ensure that sensitive data is archived and protected.

                                                                                              Run the following commands to set permissions on all existing log files:

                                                                                              find /var/log -type f -exec chmod g-wx,o-rwx "{}" + -o -type d -exec chmod g-w,o-rwx "{}" +

                                                                                              Show Assessment Evidence
                                                                                              Complex Check
                                                                                              AND
                                                                                              Criterion: Ensure any file(s) named .* in /var/log exists and does not have permissions ----wxrwx
                                                                                              Existence Check: Any Exist
                                                                                              Item Check: All
                                                                                              Result: Fail
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Filepath String Exists /var/log/lastlog
                                                                                              Path String Exists /var/log
                                                                                              Filename String Exists lastlog
                                                                                              Type String Exists regular
                                                                                              Group Id Int Exists 43
                                                                                              User Id Int Exists 0
                                                                                              A Time Int Exists 1636876575
                                                                                              C Time Int Exists 1636876988
                                                                                              M Time Int Exists 1636876988
                                                                                              Size Int Exists 292584
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists true
                                                                                              Uwrite Boolean Exists true
                                                                                              Uexec Boolean Exists false
                                                                                              Gread Boolean Exists true
                                                                                              Gwrite Boolean Exists true
                                                                                              Gexec Boolean Exists false
                                                                                              Oread Boolean Exists true
                                                                                              Owrite Boolean Exists false
                                                                                              Oexec Boolean Exists false
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Filepath String Exists /var/log/wtmp
                                                                                              Path String Exists /var/log
                                                                                              Filename String Exists wtmp
                                                                                              Type String Exists regular
                                                                                              Group Id Int Exists 43
                                                                                              User Id Int Exists 0
                                                                                              A Time Int Exists 1636877162
                                                                                              C Time Int Exists 1636876649
                                                                                              M Time Int Exists 1636876649
                                                                                              Size Int Exists 768
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists true
                                                                                              Uwrite Boolean Exists true
                                                                                              Uexec Boolean Exists false
                                                                                              Gread Boolean Exists true
                                                                                              Gwrite Boolean Exists true
                                                                                              Gexec Boolean Exists false
                                                                                              Oread Boolean Exists true
                                                                                              Owrite Boolean Exists false
                                                                                              Oexec Boolean Exists false
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Filepath String Exists /var/log/dpkg.log
                                                                                              Path String Exists /var/log
                                                                                              Filename String Exists dpkg.log
                                                                                              Type String Exists regular
                                                                                              Group Id Int Exists 0
                                                                                              User Id Int Exists 0
                                                                                              A Time Int Exists 1636876917
                                                                                              C Time Int Exists 1636876988
                                                                                              M Time Int Exists 1636876988
                                                                                              Size Int Exists 106503
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists true
                                                                                              Uwrite Boolean Exists true
                                                                                              Uexec Boolean Exists false
                                                                                              Gread Boolean Exists true
                                                                                              Gwrite Boolean Exists false
                                                                                              Gexec Boolean Exists false
                                                                                              Oread Boolean Exists true
                                                                                              Owrite Boolean Exists false
                                                                                              Oexec Boolean Exists false
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Filepath String Exists /var/log/btmp
                                                                                              Path String Exists /var/log
                                                                                              Filename String Exists btmp
                                                                                              Type String Exists regular
                                                                                              Group Id Int Exists 43
                                                                                              User Id Int Exists 0
                                                                                              A Time Int Exists 1636876575
                                                                                              C Time Int Exists 1636876575
                                                                                              M Time Int Exists 1636876575
                                                                                              Size Int Exists 0
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists true
                                                                                              Uwrite Boolean Exists true
                                                                                              Uexec Boolean Exists false
                                                                                              Gread Boolean Exists true
                                                                                              Gwrite Boolean Exists true
                                                                                              Gexec Boolean Exists false
                                                                                              Oread Boolean Exists false
                                                                                              Owrite Boolean Exists false
                                                                                              Oexec Boolean Exists false
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Filepath String Exists /var/log/tallylog
                                                                                              Path String Exists /var/log
                                                                                              Filename String Exists tallylog
                                                                                              Type String Exists regular
                                                                                              Group Id Int Exists 0
                                                                                              User Id Int Exists 0
                                                                                              A Time Int Exists 1636876988
                                                                                              C Time Int Exists 1636876988
                                                                                              M Time Int Exists 1636876988
                                                                                              Size Int Exists 64128
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists true
                                                                                              Uwrite Boolean Exists true
                                                                                              Uexec Boolean Exists false
                                                                                              Gread Boolean Exists false
                                                                                              Gwrite Boolean Exists false
                                                                                              Gexec Boolean Exists false
                                                                                              Oread Boolean Exists false
                                                                                              Owrite Boolean Exists false
                                                                                              Oexec Boolean Exists false
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Filepath String Exists /var/log/alternatives.log
                                                                                              Path String Exists /var/log
                                                                                              Filename String Exists alternatives.log
                                                                                              Type String Exists regular
                                                                                              Group Id Int Exists 0
                                                                                              User Id Int Exists 0
                                                                                              A Time Int Exists 1636876960
                                                                                              C Time Int Exists 1636876968
                                                                                              M Time Int Exists 1636876968
                                                                                              Size Int Exists 16217
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists true
                                                                                              Uwrite Boolean Exists true
                                                                                              Uexec Boolean Exists false
                                                                                              Gread Boolean Exists true
                                                                                              Gwrite Boolean Exists false
                                                                                              Gexec Boolean Exists false
                                                                                              Oread Boolean Exists true
                                                                                              Owrite Boolean Exists false
                                                                                              Oexec Boolean Exists false
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Filepath String Exists /var/log/fontconfig.log
                                                                                              Path String Exists /var/log
                                                                                              Filename String Exists fontconfig.log
                                                                                              Type String Exists regular
                                                                                              Group Id Int Exists 0
                                                                                              User Id Int Exists 0
                                                                                              A Time Int Exists 1636876957
                                                                                              C Time Int Exists 1636876959
                                                                                              M Time Int Exists 1636876959
                                                                                              Size Int Exists 352
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists true
                                                                                              Uwrite Boolean Exists true
                                                                                              Uexec Boolean Exists false
                                                                                              Gread Boolean Exists true
                                                                                              Gwrite Boolean Exists false
                                                                                              Gexec Boolean Exists false
                                                                                              Oread Boolean Exists true
                                                                                              Owrite Boolean Exists false
                                                                                              Oexec Boolean Exists false
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Filepath String Exists /var/log/dockerd.log
                                                                                              Path String Exists /var/log
                                                                                              Filename String Exists dockerd.log
                                                                                              Type String Exists regular
                                                                                              Group Id Int Exists 0
                                                                                              User Id Int Exists 0
                                                                                              A Time Int Exists 1626811642
                                                                                              C Time Int Exists 1626839084
                                                                                              M Time Int Exists 1626811642
                                                                                              Size Int Exists 11297
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists true
                                                                                              Uwrite Boolean Exists true
                                                                                              Uexec Boolean Exists false
                                                                                              Gread Boolean Exists true
                                                                                              Gwrite Boolean Exists false
                                                                                              Gexec Boolean Exists false
                                                                                              Oread Boolean Exists true
                                                                                              Owrite Boolean Exists false
                                                                                              Oexec Boolean Exists false
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Filepath String Exists /var/log/apt/history.log
                                                                                              Path String Exists /var/log/apt
                                                                                              Filename String Exists history.log
                                                                                              Type String Exists regular
                                                                                              Group Id Int Exists 0
                                                                                              User Id Int Exists 0
                                                                                              A Time Int Exists 1636876917
                                                                                              C Time Int Exists 1636876988
                                                                                              M Time Int Exists 1636876988
                                                                                              Size Int Exists 7330
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists true
                                                                                              Uwrite Boolean Exists true
                                                                                              Uexec Boolean Exists false
                                                                                              Gread Boolean Exists true
                                                                                              Gwrite Boolean Exists false
                                                                                              Gexec Boolean Exists false
                                                                                              Oread Boolean Exists true
                                                                                              Owrite Boolean Exists false
                                                                                              Oexec Boolean Exists false
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Filepath String Exists /var/log/apt/eipp.log.xz
                                                                                              Path String Exists /var/log/apt
                                                                                              Filename String Exists eipp.log.xz
                                                                                              Type String Exists regular
                                                                                              Group Id Int Exists 0
                                                                                              User Id Int Exists 0
                                                                                              A Time Int Exists 1636876986
                                                                                              C Time Int Exists 1636876986
                                                                                              M Time Int Exists 1636876986
                                                                                              Size Int Exists 16112
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists true
                                                                                              Uwrite Boolean Exists true
                                                                                              Uexec Boolean Exists false
                                                                                              Gread Boolean Exists true
                                                                                              Gwrite Boolean Exists false
                                                                                              Gexec Boolean Exists false
                                                                                              Oread Boolean Exists true
                                                                                              Owrite Boolean Exists false
                                                                                              Oexec Boolean Exists false
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Filepath String Exists /var/log/apt/term.log
                                                                                              Path String Exists /var/log/apt
                                                                                              Filename String Exists term.log
                                                                                              Type String Exists regular
                                                                                              Group Id Int Exists 4
                                                                                              User Id Int Exists 0
                                                                                              A Time Int Exists 1636876917
                                                                                              C Time Int Exists 1636876988
                                                                                              M Time Int Exists 1636876988
                                                                                              Size Int Exists 50271
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists true
                                                                                              Uwrite Boolean Exists true
                                                                                              Uexec Boolean Exists false
                                                                                              Gread Boolean Exists true
                                                                                              Gwrite Boolean Exists false
                                                                                              Gexec Boolean Exists false
                                                                                              Oread Boolean Exists false
                                                                                              Owrite Boolean Exists false
                                                                                              Oexec Boolean Exists false
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Path String Exists /var/log
                                                                                              Filename String Exists .*
                                                                                              Type String Not collected No Value
                                                                                              Group Id Int Does not exist No Value
                                                                                              User Id Int Does not exist No Value
                                                                                              A Time Int Exists null
                                                                                              C Time Int Exists null
                                                                                              M Time Int Exists null
                                                                                              Size Int Does not exist No Value
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists false
                                                                                              Uwrite Boolean Exists false
                                                                                              Uexec Boolean Exists false
                                                                                              Gread Boolean Exists false
                                                                                              Gwrite Boolean Exists false
                                                                                              Gexec Boolean Exists false
                                                                                              Oread Boolean Exists false
                                                                                              Owrite Boolean Exists false
                                                                                              Oexec Boolean Exists false
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Path String Exists /var/log
                                                                                              Filename String Exists .*
                                                                                              Type String Not collected No Value
                                                                                              Group Id Int Does not exist No Value
                                                                                              User Id Int Does not exist No Value
                                                                                              A Time Int Exists null
                                                                                              C Time Int Exists null
                                                                                              M Time Int Exists null
                                                                                              Size Int Does not exist No Value
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists false
                                                                                              Uwrite Boolean Exists false
                                                                                              Uexec Boolean Exists false
                                                                                              Gread Boolean Exists false
                                                                                              Gwrite Boolean Exists false
                                                                                              Gexec Boolean Exists false
                                                                                              Oread Boolean Exists false
                                                                                              Owrite Boolean Exists false
                                                                                              Oexec Boolean Exists false
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Path String Exists /var/log/pods/kube-system_kube-flannel-ds-pw92m_ea02deca-483d-413b-a44d-5a94d9913789/kube-flannel/0.log
                                                                                              Filename String Exists No Value
                                                                                              Type String Exists symbolic link
                                                                                              Group Id Int Exists 0
                                                                                              User Id Int Exists 0
                                                                                              A Time Int Exists 1636876643
                                                                                              C Time Int Exists 1636876643
                                                                                              M Time Int Exists 1636876643
                                                                                              Size Int Exists 165
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists true
                                                                                              Uwrite Boolean Exists true
                                                                                              Uexec Boolean Exists true
                                                                                              Gread Boolean Exists true
                                                                                              Gwrite Boolean Exists true
                                                                                              Gexec Boolean Exists true
                                                                                              Oread Boolean Exists true
                                                                                              Owrite Boolean Exists true
                                                                                              Oexec Boolean Exists true
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Path String Exists /var/log/pods/kube-system_kube-flannel-ds-pw92m_ea02deca-483d-413b-a44d-5a94d9913789/install-cni/0.log
                                                                                              Filename String Exists No Value
                                                                                              Type String Exists symbolic link
                                                                                              Group Id Int Exists 0
                                                                                              User Id Int Exists 0
                                                                                              A Time Int Exists 1636876641
                                                                                              C Time Int Exists 1636876641
                                                                                              M Time Int Exists 1636876641
                                                                                              Size Int Exists 165
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists true
                                                                                              Uwrite Boolean Exists true
                                                                                              Uexec Boolean Exists true
                                                                                              Gread Boolean Exists true
                                                                                              Gwrite Boolean Exists true
                                                                                              Gexec Boolean Exists true
                                                                                              Oread Boolean Exists true
                                                                                              Owrite Boolean Exists true
                                                                                              Oexec Boolean Exists true
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Path String Exists /var/log
                                                                                              Filename String Exists .*
                                                                                              Type String Not collected No Value
                                                                                              Group Id Int Does not exist No Value
                                                                                              User Id Int Does not exist No Value
                                                                                              A Time Int Exists null
                                                                                              C Time Int Exists null
                                                                                              M Time Int Exists null
                                                                                              Size Int Does not exist No Value
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists false
                                                                                              Uwrite Boolean Exists false
                                                                                              Uexec Boolean Exists false
                                                                                              Gread Boolean Exists false
                                                                                              Gwrite Boolean Exists false
                                                                                              Gexec Boolean Exists false
                                                                                              Oread Boolean Exists false
                                                                                              Owrite Boolean Exists false
                                                                                              Oexec Boolean Exists false
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Path String Exists /var/log/pods/kube-system_kube-controller-manager-controlplane_a875134e700993a22f67999011829566/kube-controller-manager/0.log
                                                                                              Filename String Exists No Value
                                                                                              Type String Exists symbolic link
                                                                                              Group Id Int Exists 0
                                                                                              User Id Int Exists 0
                                                                                              A Time Int Exists 1636876603
                                                                                              C Time Int Exists 1636876603
                                                                                              M Time Int Exists 1636876603
                                                                                              Size Int Exists 165
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists true
                                                                                              Uwrite Boolean Exists true
                                                                                              Uexec Boolean Exists true
                                                                                              Gread Boolean Exists true
                                                                                              Gwrite Boolean Exists true
                                                                                              Gexec Boolean Exists true
                                                                                              Oread Boolean Exists true
                                                                                              Owrite Boolean Exists true
                                                                                              Oexec Boolean Exists true
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Path String Exists /var/log
                                                                                              Filename String Exists .*
                                                                                              Type String Not collected No Value
                                                                                              Group Id Int Does not exist No Value
                                                                                              User Id Int Does not exist No Value
                                                                                              A Time Int Exists null
                                                                                              C Time Int Exists null
                                                                                              M Time Int Exists null
                                                                                              Size Int Does not exist No Value
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists false
                                                                                              Uwrite Boolean Exists false
                                                                                              Uexec Boolean Exists false
                                                                                              Gread Boolean Exists false
                                                                                              Gwrite Boolean Exists false
                                                                                              Gexec Boolean Exists false
                                                                                              Oread Boolean Exists false
                                                                                              Owrite Boolean Exists false
                                                                                              Oexec Boolean Exists false
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Path String Exists /var/log/pods/kube-system_kube-scheduler-controlplane_81d2d21449d64d5e6d5e9069a7ca99ed/kube-scheduler/0.log
                                                                                              Filename String Exists No Value
                                                                                              Type String Exists symbolic link
                                                                                              Group Id Int Exists 0
                                                                                              User Id Int Exists 0
                                                                                              A Time Int Exists 1636876603
                                                                                              C Time Int Exists 1636876603
                                                                                              M Time Int Exists 1636876603
                                                                                              Size Int Exists 165
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists true
                                                                                              Uwrite Boolean Exists true
                                                                                              Uexec Boolean Exists true
                                                                                              Gread Boolean Exists true
                                                                                              Gwrite Boolean Exists true
                                                                                              Gexec Boolean Exists true
                                                                                              Oread Boolean Exists true
                                                                                              Owrite Boolean Exists true
                                                                                              Oexec Boolean Exists true
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Path String Exists /var/log
                                                                                              Filename String Exists .*
                                                                                              Type String Not collected No Value
                                                                                              Group Id Int Does not exist No Value
                                                                                              User Id Int Does not exist No Value
                                                                                              A Time Int Exists null
                                                                                              C Time Int Exists null
                                                                                              M Time Int Exists null
                                                                                              Size Int Does not exist No Value
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists false
                                                                                              Uwrite Boolean Exists false
                                                                                              Uexec Boolean Exists false
                                                                                              Gread Boolean Exists false
                                                                                              Gwrite Boolean Exists false
                                                                                              Gexec Boolean Exists false
                                                                                              Oread Boolean Exists false
                                                                                              Owrite Boolean Exists false
                                                                                              Oexec Boolean Exists false
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Path String Exists /var/log/pods/kube-system_etcd-controlplane_bff7c59688c9937d5192c502ecb8c9d1/etcd/0.log
                                                                                              Filename String Exists No Value
                                                                                              Type String Exists symbolic link
                                                                                              Group Id Int Exists 0
                                                                                              User Id Int Exists 0
                                                                                              A Time Int Exists 1636876603
                                                                                              C Time Int Exists 1636876603
                                                                                              M Time Int Exists 1636876603
                                                                                              Size Int Exists 165
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists true
                                                                                              Uwrite Boolean Exists true
                                                                                              Uexec Boolean Exists true
                                                                                              Gread Boolean Exists true
                                                                                              Gwrite Boolean Exists true
                                                                                              Gexec Boolean Exists true
                                                                                              Oread Boolean Exists true
                                                                                              Owrite Boolean Exists true
                                                                                              Oexec Boolean Exists true
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Path String Exists /var/log
                                                                                              Filename String Exists .*
                                                                                              Type String Not collected No Value
                                                                                              Group Id Int Does not exist No Value
                                                                                              User Id Int Does not exist No Value
                                                                                              A Time Int Exists null
                                                                                              C Time Int Exists null
                                                                                              M Time Int Exists null
                                                                                              Size Int Does not exist No Value
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists false
                                                                                              Uwrite Boolean Exists false
                                                                                              Uexec Boolean Exists false
                                                                                              Gread Boolean Exists false
                                                                                              Gwrite Boolean Exists false
                                                                                              Gexec Boolean Exists false
                                                                                              Oread Boolean Exists false
                                                                                              Owrite Boolean Exists false
                                                                                              Oexec Boolean Exists false
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Path String Exists /var/log/pods/kube-system_coredns-74ff55c5b-6hbt8_f16a8f2f-929f-476f-bd77-cf23475fb870/coredns/0.log
                                                                                              Filename String Exists No Value
                                                                                              Type String Exists symbolic link
                                                                                              Group Id Int Exists 0
                                                                                              User Id Int Exists 0
                                                                                              A Time Int Exists 1636876657
                                                                                              C Time Int Exists 1636876657
                                                                                              M Time Int Exists 1636876657
                                                                                              Size Int Exists 165
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists true
                                                                                              Uwrite Boolean Exists true
                                                                                              Uexec Boolean Exists true
                                                                                              Gread Boolean Exists true
                                                                                              Gwrite Boolean Exists true
                                                                                              Gexec Boolean Exists true
                                                                                              Oread Boolean Exists true
                                                                                              Owrite Boolean Exists true
                                                                                              Oexec Boolean Exists true
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Path String Exists /var/log
                                                                                              Filename String Exists .*
                                                                                              Type String Not collected No Value
                                                                                              Group Id Int Does not exist No Value
                                                                                              User Id Int Does not exist No Value
                                                                                              A Time Int Exists null
                                                                                              C Time Int Exists null
                                                                                              M Time Int Exists null
                                                                                              Size Int Does not exist No Value
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists false
                                                                                              Uwrite Boolean Exists false
                                                                                              Uexec Boolean Exists false
                                                                                              Gread Boolean Exists false
                                                                                              Gwrite Boolean Exists false
                                                                                              Gexec Boolean Exists false
                                                                                              Oread Boolean Exists false
                                                                                              Owrite Boolean Exists false
                                                                                              Oexec Boolean Exists false
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Path String Exists /var/log/pods/kube-system_coredns-74ff55c5b-vqdnc_c62815e2-8172-44e3-a586-c3364e042508/coredns/0.log
                                                                                              Filename String Exists No Value
                                                                                              Type String Exists symbolic link
                                                                                              Group Id Int Exists 0
                                                                                              User Id Int Exists 0
                                                                                              A Time Int Exists 1636876657
                                                                                              C Time Int Exists 1636876657
                                                                                              M Time Int Exists 1636876657
                                                                                              Size Int Exists 165
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists true
                                                                                              Uwrite Boolean Exists true
                                                                                              Uexec Boolean Exists true
                                                                                              Gread Boolean Exists true
                                                                                              Gwrite Boolean Exists true
                                                                                              Gexec Boolean Exists true
                                                                                              Oread Boolean Exists true
                                                                                              Owrite Boolean Exists true
                                                                                              Oexec Boolean Exists true
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Path String Exists /var/log
                                                                                              Filename String Exists .*
                                                                                              Type String Not collected No Value
                                                                                              Group Id Int Does not exist No Value
                                                                                              User Id Int Does not exist No Value
                                                                                              A Time Int Exists null
                                                                                              C Time Int Exists null
                                                                                              M Time Int Exists null
                                                                                              Size Int Does not exist No Value
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists false
                                                                                              Uwrite Boolean Exists false
                                                                                              Uexec Boolean Exists false
                                                                                              Gread Boolean Exists false
                                                                                              Gwrite Boolean Exists false
                                                                                              Gexec Boolean Exists false
                                                                                              Oread Boolean Exists false
                                                                                              Owrite Boolean Exists false
                                                                                              Oexec Boolean Exists false
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Path String Exists /var/log/pods/kube-system_kube-proxy-c88qm_8c793d5a-2ad8-4ebe-a554-1baab1a8298d/kube-proxy/0.log
                                                                                              Filename String Exists No Value
                                                                                              Type String Exists symbolic link
                                                                                              Group Id Int Exists 0
                                                                                              User Id Int Exists 0
                                                                                              A Time Int Exists 1636876640
                                                                                              C Time Int Exists 1636876640
                                                                                              M Time Int Exists 1636876640
                                                                                              Size Int Exists 165
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists true
                                                                                              Uwrite Boolean Exists true
                                                                                              Uexec Boolean Exists true
                                                                                              Gread Boolean Exists true
                                                                                              Gwrite Boolean Exists true
                                                                                              Gexec Boolean Exists true
                                                                                              Oread Boolean Exists true
                                                                                              Owrite Boolean Exists true
                                                                                              Oexec Boolean Exists true
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Path String Exists /var/log
                                                                                              Filename String Exists .*
                                                                                              Type String Not collected No Value
                                                                                              Group Id Int Does not exist No Value
                                                                                              User Id Int Does not exist No Value
                                                                                              A Time Int Exists null
                                                                                              C Time Int Exists null
                                                                                              M Time Int Exists null
                                                                                              Size Int Does not exist No Value
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists false
                                                                                              Uwrite Boolean Exists false
                                                                                              Uexec Boolean Exists false
                                                                                              Gread Boolean Exists false
                                                                                              Gwrite Boolean Exists false
                                                                                              Gexec Boolean Exists false
                                                                                              Oread Boolean Exists false
                                                                                              Owrite Boolean Exists false
                                                                                              Oexec Boolean Exists false
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Path String Exists /var/log/pods/kube-system_kube-apiserver-controlplane_a3ab41cf645b63a453f49b6e83c68f97/kube-apiserver/0.log
                                                                                              Filename String Exists No Value
                                                                                              Type String Exists symbolic link
                                                                                              Group Id Int Exists 0
                                                                                              User Id Int Exists 0
                                                                                              A Time Int Exists 1636876604
                                                                                              C Time Int Exists 1636876604
                                                                                              M Time Int Exists 1636876604
                                                                                              Size Int Exists 165
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists true
                                                                                              Uwrite Boolean Exists true
                                                                                              Uexec Boolean Exists true
                                                                                              Gread Boolean Exists true
                                                                                              Gwrite Boolean Exists true
                                                                                              Gexec Boolean Exists true
                                                                                              Oread Boolean Exists true
                                                                                              Owrite Boolean Exists true
                                                                                              Oexec Boolean Exists true
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Path String Exists /var/log/containers/kube-flannel-ds-pw92m_kube-system_kube-flannel-8ab62e43d5e1a18994826f328b83f888bd7a2b949f2e24d2a79e2dd4f62b45d0.log
                                                                                              Filename String Exists No Value
                                                                                              Type String Exists symbolic link
                                                                                              Group Id Int Exists 0
                                                                                              User Id Int Exists 0
                                                                                              A Time Int Exists 1636876643
                                                                                              C Time Int Exists 1636876643
                                                                                              M Time Int Exists 1636876643
                                                                                              Size Int Exists 103
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists true
                                                                                              Uwrite Boolean Exists true
                                                                                              Uexec Boolean Exists true
                                                                                              Gread Boolean Exists true
                                                                                              Gwrite Boolean Exists true
                                                                                              Gexec Boolean Exists true
                                                                                              Oread Boolean Exists true
                                                                                              Owrite Boolean Exists true
                                                                                              Oexec Boolean Exists true
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Path String Exists /var/log/containers/kube-proxy-c88qm_kube-system_kube-proxy-1514a3914c4860c4992c22427ca6a6425438ab1c0209a8e955a7a77a80da48f7.log
                                                                                              Filename String Exists No Value
                                                                                              Type String Exists symbolic link
                                                                                              Group Id Int Exists 0
                                                                                              User Id Int Exists 0
                                                                                              A Time Int Exists 1636876640
                                                                                              C Time Int Exists 1636876640
                                                                                              M Time Int Exists 1636876640
                                                                                              Size Int Exists 96
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists true
                                                                                              Uwrite Boolean Exists true
                                                                                              Uexec Boolean Exists true
                                                                                              Gread Boolean Exists true
                                                                                              Gwrite Boolean Exists true
                                                                                              Gexec Boolean Exists true
                                                                                              Oread Boolean Exists true
                                                                                              Owrite Boolean Exists true
                                                                                              Oexec Boolean Exists true
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Path String Exists /var/log/containers/kube-scheduler-controlplane_kube-system_kube-scheduler-d3eb830444cdf412d25c581b9c3411ee59d8b602c222a39553618abc71e045b9.log
                                                                                              Filename String Exists No Value
                                                                                              Type String Exists symbolic link
                                                                                              Group Id Int Exists 0
                                                                                              User Id Int Exists 0
                                                                                              A Time Int Exists 1636876603
                                                                                              C Time Int Exists 1636876603
                                                                                              M Time Int Exists 1636876603
                                                                                              Size Int Exists 107
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists true
                                                                                              Uwrite Boolean Exists true
                                                                                              Uexec Boolean Exists true
                                                                                              Gread Boolean Exists true
                                                                                              Gwrite Boolean Exists true
                                                                                              Gexec Boolean Exists true
                                                                                              Oread Boolean Exists true
                                                                                              Owrite Boolean Exists true
                                                                                              Oexec Boolean Exists true
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Path String Exists /var/log/containers/kube-flannel-ds-pw92m_kube-system_install-cni-2b0d091900c830112bc436f99bad4152048b63e60fd28fcfa3d5a86af8b5d27e.log
                                                                                              Filename String Exists No Value
                                                                                              Type String Exists symbolic link
                                                                                              Group Id Int Exists 0
                                                                                              User Id Int Exists 0
                                                                                              A Time Int Exists 1636876641
                                                                                              C Time Int Exists 1636876641
                                                                                              M Time Int Exists 1636876641
                                                                                              Size Int Exists 102
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists true
                                                                                              Uwrite Boolean Exists true
                                                                                              Uexec Boolean Exists true
                                                                                              Gread Boolean Exists true
                                                                                              Gwrite Boolean Exists true
                                                                                              Gexec Boolean Exists true
                                                                                              Oread Boolean Exists true
                                                                                              Owrite Boolean Exists true
                                                                                              Oexec Boolean Exists true
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Path String Exists /var/log/containers/coredns-74ff55c5b-6hbt8_kube-system_coredns-887250474a695b9abc3596225c91c775cd2846c386091799f0c4947daea2d7ab.log
                                                                                              Filename String Exists No Value
                                                                                              Type String Exists symbolic link
                                                                                              Group Id Int Exists 0
                                                                                              User Id Int Exists 0
                                                                                              A Time Int Exists 1636876657
                                                                                              C Time Int Exists 1636876657
                                                                                              M Time Int Exists 1636876657
                                                                                              Size Int Exists 100
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists true
                                                                                              Uwrite Boolean Exists true
                                                                                              Uexec Boolean Exists true
                                                                                              Gread Boolean Exists true
                                                                                              Gwrite Boolean Exists true
                                                                                              Gexec Boolean Exists true
                                                                                              Oread Boolean Exists true
                                                                                              Owrite Boolean Exists true
                                                                                              Oexec Boolean Exists true
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Path String Exists /var/log/containers/etcd-controlplane_kube-system_etcd-921f162e1b63b409d5720d8c106b4668452f4c21ac64718ca341e3e14e5bec44.log
                                                                                              Filename String Exists No Value
                                                                                              Type String Exists symbolic link
                                                                                              Group Id Int Exists 0
                                                                                              User Id Int Exists 0
                                                                                              A Time Int Exists 1636876603
                                                                                              C Time Int Exists 1636876603
                                                                                              M Time Int Exists 1636876603
                                                                                              Size Int Exists 87
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists true
                                                                                              Uwrite Boolean Exists true
                                                                                              Uexec Boolean Exists true
                                                                                              Gread Boolean Exists true
                                                                                              Gwrite Boolean Exists true
                                                                                              Gexec Boolean Exists true
                                                                                              Oread Boolean Exists true
                                                                                              Owrite Boolean Exists true
                                                                                              Oexec Boolean Exists true
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Path String Exists /var/log/containers/kube-controller-manager-controlplane_kube-system_kube-controller-manager-71eae630f95a43ce3fdb19d323767b78a1eedc0717c4f70e75ffb5f64617541e.log
                                                                                              Filename String Exists No Value
                                                                                              Type String Exists symbolic link
                                                                                              Group Id Int Exists 0
                                                                                              User Id Int Exists 0
                                                                                              A Time Int Exists 1636876603
                                                                                              C Time Int Exists 1636876603
                                                                                              M Time Int Exists 1636876603
                                                                                              Size Int Exists 125
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists true
                                                                                              Uwrite Boolean Exists true
                                                                                              Uexec Boolean Exists true
                                                                                              Gread Boolean Exists true
                                                                                              Gwrite Boolean Exists true
                                                                                              Gexec Boolean Exists true
                                                                                              Oread Boolean Exists true
                                                                                              Owrite Boolean Exists true
                                                                                              Oexec Boolean Exists true
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Path String Exists /var/log/containers/coredns-74ff55c5b-vqdnc_kube-system_coredns-a72f5268dcb9d3926a91a146943cea6fe051dcd78eb0bc7e33fa53e7ffee344c.log
                                                                                              Filename String Exists No Value
                                                                                              Type String Exists symbolic link
                                                                                              Group Id Int Exists 0
                                                                                              User Id Int Exists 0
                                                                                              A Time Int Exists 1636876657
                                                                                              C Time Int Exists 1636876657
                                                                                              M Time Int Exists 1636876657
                                                                                              Size Int Exists 100
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists true
                                                                                              Uwrite Boolean Exists true
                                                                                              Uexec Boolean Exists true
                                                                                              Gread Boolean Exists true
                                                                                              Gwrite Boolean Exists true
                                                                                              Gexec Boolean Exists true
                                                                                              Oread Boolean Exists true
                                                                                              Owrite Boolean Exists true
                                                                                              Oexec Boolean Exists true
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Path String Exists /var/log/containers/kube-apiserver-controlplane_kube-system_kube-apiserver-b92d2d49760fc4eef85714d7e072f9350acf076d4cf8b188c300b37c1a731d73.log
                                                                                              Filename String Exists No Value
                                                                                              Type String Exists symbolic link
                                                                                              Group Id Int Exists 0
                                                                                              User Id Int Exists 0
                                                                                              A Time Int Exists 1636876604
                                                                                              C Time Int Exists 1636876604
                                                                                              M Time Int Exists 1636876604
                                                                                              Size Int Exists 107
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists true
                                                                                              Uwrite Boolean Exists true
                                                                                              Uexec Boolean Exists true
                                                                                              Gread Boolean Exists true
                                                                                              Gwrite Boolean Exists true
                                                                                              Gexec Boolean Exists true
                                                                                              Oread Boolean Exists true
                                                                                              Owrite Boolean Exists true
                                                                                              Oexec Boolean Exists true
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Filepath String Exists /var/log/apache2/error.log
                                                                                              Path String Exists /var/log/apache2
                                                                                              Filename String Exists error.log
                                                                                              Type String Exists regular
                                                                                              Group Id Int Exists 4
                                                                                              User Id Int Exists 0
                                                                                              A Time Int Exists 1636876954
                                                                                              C Time Int Exists 1636876982
                                                                                              M Time Int Exists 1636876982
                                                                                              Size Int Exists 281
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists true
                                                                                              Uwrite Boolean Exists true
                                                                                              Uexec Boolean Exists false
                                                                                              Gread Boolean Exists true
                                                                                              Gwrite Boolean Exists false
                                                                                              Gexec Boolean Exists false
                                                                                              Oread Boolean Exists false
                                                                                              Owrite Boolean Exists false
                                                                                              Oexec Boolean Exists false
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Filepath String Exists /var/log/apache2/other_vhosts_access.log
                                                                                              Path String Exists /var/log/apache2
                                                                                              Filename String Exists other_vhosts_access.log
                                                                                              Type String Exists regular
                                                                                              Group Id Int Exists 4
                                                                                              User Id Int Exists 0
                                                                                              A Time Int Exists 1636876954
                                                                                              C Time Int Exists 1636876954
                                                                                              M Time Int Exists 1636876954
                                                                                              Size Int Exists 0
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists true
                                                                                              Uwrite Boolean Exists true
                                                                                              Uexec Boolean Exists false
                                                                                              Gread Boolean Exists true
                                                                                              Gwrite Boolean Exists false
                                                                                              Gexec Boolean Exists false
                                                                                              Oread Boolean Exists false
                                                                                              Owrite Boolean Exists false
                                                                                              Oexec Boolean Exists false
                                                                                              Has Extended Acl Boolean Not collected No Value
                                                                                              File Item
                                                                                              Name Type Status Value
                                                                                              Filepath String Exists /var/log/apache2/access.log
                                                                                              Path String Exists /var/log/apache2
                                                                                              Filename String Exists access.log
                                                                                              Type String Exists regular
                                                                                              Group Id Int Exists 4
                                                                                              User Id Int Exists 0
                                                                                              A Time Int Exists 1636876954
                                                                                              C Time Int Exists 1636876954
                                                                                              M Time Int Exists 1636876954
                                                                                              Size Int Exists 0
                                                                                              Suid Int Exists false
                                                                                              Sgid Boolean Exists false
                                                                                              Sticky Boolean Exists false
                                                                                              Uread Boolean Exists true
                                                                                              Uwrite Boolean Exists true
                                                                                              Uexec Boolean Exists false
                                                                                              Gread Boolean Exists true
                                                                                              Gwrite Boolean Exists false
                                                                                              Gexec Boolean Exists false
                                                                                              Oread Boolean Exists false
                                                                                              Owrite Boolean Exists false
                                                                                              Oexec Boolean Exists false
                                                                                              Has Extended Acl Boolean Not collected No Value


                                                                                              Show Rule Result XML

                                                                                              References:

                                                                                                CIS Controls V7.0:

                                                                                                • Control 13: Data Protection: -- More

                                                                                                5 Access, Authentication and Authorization

                                                                                                5.1 Configure time-based job schedulers

                                                                                                cron is a time-based job scheduler used to schedule jobs, commands or shell scripts, to run periodically at fixed times, dates, or intervals.

                                                                                                at provides the ability to execute a command or shell script at a specified date and hour, or after a given interval of time.

                                                                                                Notes:

                                                                                                • Other methods exist for scheduling jobs, such as systemd timers . If another method is used, it should be secured in accordance with local site policy
                                                                                                • systemd timers are systemd unit files whose name ends in .timer that control .service files or events
                                                                                                  • Timers can be used as an alternative to cron and at
                                                                                                  • Timers have built-in support for calendar time events, monotonic time events, and can be run asynchronously
                                                                                                • If cron and at are not installed, this section can be skipped
                                                                                                Fail

                                                                                                5.1.1 Ensure cron daemon is enabled and running

                                                                                                Description:

                                                                                                The cron daemon is used to execute batch jobs on the system.

                                                                                                Note: Other methods, such as systemd timers , exist for scheduling jobs. If another method is used, cron should be removed, and the alternate method should be secured in accordance with local site policy

                                                                                                While there may not be user jobs that need to be run on the system, the system does have maintenance jobs that may include security monitoring that have to run, and cron is used to execute them.

                                                                                                Run the following command to enable and start cron :

                                                                                                # systemctl --now enable cron

                                                                                                Show Assessment Evidence
                                                                                                Complex Check
                                                                                                OR
                                                                                                Script: sce/service_enabled_running.sh
                                                                                                Result: Fail
                                                                                                Exit Value: 102
                                                                                                Output:
                                                                                                • Service cron is not running or disabled
                                                                                                No error lines were collected.
                                                                                                Criterion: Ensure package name equals 'cron' is not installed
                                                                                                Existence Check: None Exist
                                                                                                Item Check: All
                                                                                                Result: Fail
                                                                                                Dpkginfo Item
                                                                                                Name Type Status Value
                                                                                                Name String Exists cron
                                                                                                Arch String Exists amd64
                                                                                                Epoch String Exists (none)
                                                                                                Release String Exists 128.1ubuntu1
                                                                                                Version String Exists 3.0pl1
                                                                                                Evr Evr String Exists 0:3.0pl1-128.1ubuntu1


                                                                                                Show Rule Result XML

                                                                                                References:

                                                                                                  CIS Controls V7.0:

                                                                                                  • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More

                                                                                                  Fail

                                                                                                  5.1.2 Ensure permissions on /etc/crontab are configured

                                                                                                  Description:

                                                                                                  The /etc/crontab file is used by cron to control its own jobs. The commands in this item make sure that root is the user and group owner of the file and that only the owner can access the file.

                                                                                                  Note: Other methods, such as systemd timers , exist for scheduling jobs. If another method is used, cron should be removed, and the alternate method should be secured in accordance with local site policy

                                                                                                  This file contains information on what system jobs are run by cron. Write access to these files could provide unprivileged users with the ability to elevate their privileges. Read access to these files could provide users with the ability to gain insight on system jobs that run on the system and could provide them a way to gain unauthorized privileged access.

                                                                                                  Run the following commands to set ownership and permissions on /etc/crontab :

                                                                                                  # chown root:root /etc/crontab # chmod og-rwx /etc/crontab

                                                                                                  Show Assessment Evidence
                                                                                                  Complex Check
                                                                                                  OR
                                                                                                  Criterion: Ensure at least one file named /etc/crontab exists and is owned by 0:0 and does not have permissions ---rwxrwx
                                                                                                  Existence Check: At Least One Exists
                                                                                                  Item Check: All
                                                                                                  Result: Fail
                                                                                                  File Item
                                                                                                  Name Type Status Value
                                                                                                  Filepath String Exists /etc/crontab
                                                                                                  Path String Exists /etc
                                                                                                  Filename String Exists crontab
                                                                                                  Type String Exists regular
                                                                                                  Group Id Int Exists 1001
                                                                                                  User Id Int Exists 1001
                                                                                                  A Time Int Exists 1636876986
                                                                                                  C Time Int Exists 1636876988
                                                                                                  M Time Int Exists 1510810159
                                                                                                  Size Int Exists 722
                                                                                                  Suid Int Exists false
                                                                                                  Sgid Boolean Exists false
                                                                                                  Sticky Boolean Exists false
                                                                                                  Uread Boolean Exists true
                                                                                                  Uwrite Boolean Exists true
                                                                                                  Uexec Boolean Exists false
                                                                                                  Gread Boolean Exists true
                                                                                                  Gwrite Boolean Exists false
                                                                                                  Gexec Boolean Exists false
                                                                                                  Oread Boolean Exists true
                                                                                                  Owrite Boolean Exists false
                                                                                                  Oexec Boolean Exists false
                                                                                                  Has Extended Acl Boolean Not collected No Value
                                                                                                  Criterion: Ensure package name equals 'cron' is not installed
                                                                                                  Existence Check: None Exist
                                                                                                  Item Check: All
                                                                                                  Result: Fail
                                                                                                  Dpkginfo Item
                                                                                                  Name Type Status Value
                                                                                                  Name String Exists cron
                                                                                                  Arch String Exists amd64
                                                                                                  Epoch String Exists (none)
                                                                                                  Release String Exists 128.1ubuntu1
                                                                                                  Version String Exists 3.0pl1
                                                                                                  Evr Evr String Exists 0:3.0pl1-128.1ubuntu1


                                                                                                  Show Rule Result XML

                                                                                                  References:

                                                                                                    CIS Controls V7.0:

                                                                                                    • Control 14: Controlled Access Based on the Need to Know: -- More

                                                                                                    Fail

                                                                                                    5.1.3 Ensure permissions on /etc/cron.hourly are configured

                                                                                                    Description:

                                                                                                    This directory contains system cron jobs that need to run on an hourly basis. The files in this directory cannot be manipulated by the crontab command, but are instead edited by system administrators using a text editor. The commands below restrict read/write and search access to user and group root, preventing regular users from accessing this directory.

                                                                                                    Note: Other methods, such as systemd timers , exist for scheduling jobs. If another method is used, cron should be removed, and the alternate method should be secured in accordance with local site policy

                                                                                                    Granting write access to this directory for non-privileged users could provide them the means for gaining unauthorized elevated privileges. Granting read access to this directory could give an unprivileged user insight in how to gain elevated privileges or circumvent auditing controls.

                                                                                                    Run the following commands to set ownership and permissions on the /etc/cron.hourly directory:

                                                                                                    # chown root:root /etc/cron.hourly/



                                                                                                    # chmod og-rwx /etc/cron.hourly/

                                                                                                    Show Assessment Evidence
                                                                                                    Complex Check
                                                                                                    OR
                                                                                                    Criterion: Ensure at least one file named /etc/cron.hourly/ exists and is owned by 0:0 and does not have permissions ---rwxrwx
                                                                                                    Existence Check: At Least One Exists
                                                                                                    Item Check: All
                                                                                                    Result: Fail
                                                                                                    File Item
                                                                                                    Name Type Status Value
                                                                                                    Path String Exists /etc/cron.hourly
                                                                                                    Filename String Exists No Value
                                                                                                    Type String Exists directory
                                                                                                    Group Id Int Exists 0
                                                                                                    User Id Int Exists 0
                                                                                                    A Time Int Exists 1636876986
                                                                                                    C Time Int Exists 1636876986
                                                                                                    M Time Int Exists 1636876986
                                                                                                    Size Int Exists 4096
                                                                                                    Suid Int Exists false
                                                                                                    Sgid Boolean Exists false
                                                                                                    Sticky Boolean Exists false
                                                                                                    Uread Boolean Exists true
                                                                                                    Uwrite Boolean Exists true
                                                                                                    Uexec Boolean Exists true
                                                                                                    Gread Boolean Exists true
                                                                                                    Gwrite Boolean Exists false
                                                                                                    Gexec Boolean Exists true
                                                                                                    Oread Boolean Exists true
                                                                                                    Owrite Boolean Exists false
                                                                                                    Oexec Boolean Exists true
                                                                                                    Has Extended Acl Boolean Not collected No Value
                                                                                                    Criterion: Ensure package name equals 'cron' is not installed
                                                                                                    Existence Check: None Exist
                                                                                                    Item Check: All
                                                                                                    Result: Fail
                                                                                                    Dpkginfo Item
                                                                                                    Name Type Status Value
                                                                                                    Name String Exists cron
                                                                                                    Arch String Exists amd64
                                                                                                    Epoch String Exists (none)
                                                                                                    Release String Exists 128.1ubuntu1
                                                                                                    Version String Exists 3.0pl1
                                                                                                    Evr Evr String Exists 0:3.0pl1-128.1ubuntu1


                                                                                                    Show Rule Result XML

                                                                                                    References:

                                                                                                      CIS Controls V7.0:

                                                                                                      • Control 14: Controlled Access Based on the Need to Know: -- More

                                                                                                      Fail

                                                                                                      5.1.4 Ensure permissions on /etc/cron.daily are configured

                                                                                                      Description:

                                                                                                      The /etc/cron.daily directory contains system cron jobs that need to run on a daily basis. The files in this directory cannot be manipulated by the crontab command, but are instead edited by system administrators using a text editor. The commands below restrict read/write and search access to user and group root, preventing regular users from accessing this directory.

                                                                                                      Note: Other methods, such as systemd timers , exist for scheduling jobs. If another method is used, cron should be removed, and the alternate method should be secured in accordance with local site policy

                                                                                                      Granting write access to this directory for non-privileged users could provide them the means for gaining unauthorized elevated privileges. Granting read access to this directory could give an unprivileged user insight in how to gain elevated privileges or circumvent auditing controls.

                                                                                                      Run the following commands to set ownership and permissions on the /etc/cron.daily directory:

                                                                                                      # chown root:root /etc/cron.daily/



                                                                                                      # chmod og-rwx /etc/cron.daily/

                                                                                                      Show Assessment Evidence
                                                                                                      Complex Check
                                                                                                      OR
                                                                                                      Criterion: Ensure at least one file named /etc/cron.daily/ exists and is owned by 0:0 and does not have permissions ---rwxrwx
                                                                                                      Existence Check: At Least One Exists
                                                                                                      Item Check: All
                                                                                                      Result: Fail
                                                                                                      File Item
                                                                                                      Name Type Status Value
                                                                                                      Path String Exists /etc/cron.daily
                                                                                                      Filename String Exists No Value
                                                                                                      Type String Exists directory
                                                                                                      Group Id Int Exists 0
                                                                                                      User Id Int Exists 0
                                                                                                      A Time Int Exists 1626839045
                                                                                                      C Time Int Exists 1636876986
                                                                                                      M Time Int Exists 1636876986
                                                                                                      Size Int Exists 4096
                                                                                                      Suid Int Exists false
                                                                                                      Sgid Boolean Exists false
                                                                                                      Sticky Boolean Exists false
                                                                                                      Uread Boolean Exists true
                                                                                                      Uwrite Boolean Exists true
                                                                                                      Uexec Boolean Exists true
                                                                                                      Gread Boolean Exists true
                                                                                                      Gwrite Boolean Exists false
                                                                                                      Gexec Boolean Exists true
                                                                                                      Oread Boolean Exists true
                                                                                                      Owrite Boolean Exists false
                                                                                                      Oexec Boolean Exists true
                                                                                                      Has Extended Acl Boolean Not collected No Value
                                                                                                      Criterion: Ensure package name equals 'cron' is not installed
                                                                                                      Existence Check: None Exist
                                                                                                      Item Check: All
                                                                                                      Result: Fail
                                                                                                      Dpkginfo Item
                                                                                                      Name Type Status Value
                                                                                                      Name String Exists cron
                                                                                                      Arch String Exists amd64
                                                                                                      Epoch String Exists (none)
                                                                                                      Release String Exists 128.1ubuntu1
                                                                                                      Version String Exists 3.0pl1
                                                                                                      Evr Evr String Exists 0:3.0pl1-128.1ubuntu1


                                                                                                      Show Rule Result XML

                                                                                                      References:

                                                                                                        CIS Controls V7.0:

                                                                                                        • Control 14: Controlled Access Based on the Need to Know: -- More

                                                                                                        Fail

                                                                                                        5.1.5 Ensure permissions on /etc/cron.weekly are configured

                                                                                                        Description:

                                                                                                        The /etc/cron.weekly directory contains system cron jobs that need to run on a weekly basis. The files in this directory cannot be manipulated by the crontab command, but are instead edited by system administrators using a text editor. The commands below restrict read/write and search access to user and group root, preventing regular users from accessing this directory.

                                                                                                        Note: Other methods, such as systemd timers , exist for scheduling jobs. If another method is used, cron should be removed, and the alternate method should be secured in accordance with local site policy

                                                                                                        Granting write access to this directory for non-privileged users could provide them the means for gaining unauthorized elevated privileges. Granting read access to this directory could give an unprivileged user insight in how to gain elevated privileges or circumvent auditing controls.

                                                                                                        Run the following commands to set ownership and permissions on the /etc/cron.weekly directory:

                                                                                                        # chown root:root /etc/cron.weekly/



                                                                                                        # chmod og-rwx /etc/cron.weekly/

                                                                                                        Show Assessment Evidence
                                                                                                        Complex Check
                                                                                                        OR
                                                                                                        Criterion: Ensure at least one file named /etc/cron.weekly/ exists and is owned by 0:0 and does not have permissions ---rwxrwx
                                                                                                        Existence Check: At Least One Exists
                                                                                                        Item Check: All
                                                                                                        Result: Fail
                                                                                                        File Item
                                                                                                        Name Type Status Value
                                                                                                        Path String Exists /etc/cron.weekly
                                                                                                        Filename String Exists No Value
                                                                                                        Type String Exists directory
                                                                                                        Group Id Int Exists 0
                                                                                                        User Id Int Exists 0
                                                                                                        A Time Int Exists 1636876986
                                                                                                        C Time Int Exists 1636876986
                                                                                                        M Time Int Exists 1636876986
                                                                                                        Size Int Exists 4096
                                                                                                        Suid Int Exists false
                                                                                                        Sgid Boolean Exists false
                                                                                                        Sticky Boolean Exists false
                                                                                                        Uread Boolean Exists true
                                                                                                        Uwrite Boolean Exists true
                                                                                                        Uexec Boolean Exists true
                                                                                                        Gread Boolean Exists true
                                                                                                        Gwrite Boolean Exists false
                                                                                                        Gexec Boolean Exists true
                                                                                                        Oread Boolean Exists true
                                                                                                        Owrite Boolean Exists false
                                                                                                        Oexec Boolean Exists true
                                                                                                        Has Extended Acl Boolean Not collected No Value
                                                                                                        Criterion: Ensure package name equals 'cron' is not installed
                                                                                                        Existence Check: None Exist
                                                                                                        Item Check: All
                                                                                                        Result: Fail
                                                                                                        Dpkginfo Item
                                                                                                        Name Type Status Value
                                                                                                        Name String Exists cron
                                                                                                        Arch String Exists amd64
                                                                                                        Epoch String Exists (none)
                                                                                                        Release String Exists 128.1ubuntu1
                                                                                                        Version String Exists 3.0pl1
                                                                                                        Evr Evr String Exists 0:3.0pl1-128.1ubuntu1


                                                                                                        Show Rule Result XML

                                                                                                        References:

                                                                                                          CIS Controls V7.0:

                                                                                                          • Control 14: Controlled Access Based on the Need to Know: -- More

                                                                                                          Fail

                                                                                                          5.1.6 Ensure permissions on /etc/cron.monthly are configured

                                                                                                          Description:

                                                                                                          The /etc/cron.monthly directory contains system cron jobs that need to run on a monthly basis. The files in this directory cannot be manipulated by the crontab command, but are instead edited by system administrators using a text editor. The commands below restrict read/write and search access to user and group root, preventing regular users from accessing this directory.

                                                                                                          Note: Other methods, such as systemd timers , exist for scheduling jobs. If another method is used, cron should be removed, and the alternate method should be secured in accordance with local site policy

                                                                                                          Granting write access to this directory for non-privileged users could provide them the means for gaining unauthorized elevated privileges. Granting read access to this directory could give an unprivileged user insight in how to gain elevated privileges or circumvent auditing controls.

                                                                                                          Run the following commands to set ownership and permissions on the /etc/cron.monthly directory:

                                                                                                          # chown root:root /etc/cron.monthly/



                                                                                                          # chmod og-rwx /etc/cron.monthly/

                                                                                                          Show Assessment Evidence
                                                                                                          Complex Check
                                                                                                          OR
                                                                                                          Criterion: Ensure at least one file named /etc/cron.monthly/ exists and is owned by 0:0 and does not have permissions ---rwxrwx
                                                                                                          Existence Check: At Least One Exists
                                                                                                          Item Check: All
                                                                                                          Result: Fail
                                                                                                          File Item
                                                                                                          Name Type Status Value
                                                                                                          Path String Exists /etc/cron.monthly
                                                                                                          Filename String Exists No Value
                                                                                                          Type String Exists directory
                                                                                                          Group Id Int Exists 0
                                                                                                          User Id Int Exists 0
                                                                                                          A Time Int Exists 1636876986
                                                                                                          C Time Int Exists 1636876986
                                                                                                          M Time Int Exists 1636876986
                                                                                                          Size Int Exists 4096
                                                                                                          Suid Int Exists false
                                                                                                          Sgid Boolean Exists false
                                                                                                          Sticky Boolean Exists false
                                                                                                          Uread Boolean Exists true
                                                                                                          Uwrite Boolean Exists true
                                                                                                          Uexec Boolean Exists true
                                                                                                          Gread Boolean Exists true
                                                                                                          Gwrite Boolean Exists false
                                                                                                          Gexec Boolean Exists true
                                                                                                          Oread Boolean Exists true
                                                                                                          Owrite Boolean Exists false
                                                                                                          Oexec Boolean Exists true
                                                                                                          Has Extended Acl Boolean Not collected No Value
                                                                                                          Criterion: Ensure package name equals 'cron' is not installed
                                                                                                          Existence Check: None Exist
                                                                                                          Item Check: All
                                                                                                          Result: Fail
                                                                                                          Dpkginfo Item
                                                                                                          Name Type Status Value
                                                                                                          Name String Exists cron
                                                                                                          Arch String Exists amd64
                                                                                                          Epoch String Exists (none)
                                                                                                          Release String Exists 128.1ubuntu1
                                                                                                          Version String Exists 3.0pl1
                                                                                                          Evr Evr String Exists 0:3.0pl1-128.1ubuntu1


                                                                                                          Show Rule Result XML

                                                                                                          References:

                                                                                                            CIS Controls V7.0:

                                                                                                            • Control 14: Controlled Access Based on the Need to Know: -- More

                                                                                                            Fail

                                                                                                            5.1.7 Ensure permissions on /etc/cron.d are configured

                                                                                                            Description:

                                                                                                            The /etc/cron.d directory contains system cron jobs that need to run in a similar manner to the hourly, daily weekly and monthly jobs from /etc/crontab , but require more granular control as to when they run. The files in this directory cannot be manipulated by the crontab command, but are instead edited by system administrators using a text editor. The commands below restrict read/write and search access to user and group root, preventing regular users from accessing this directory.

                                                                                                            Note: Other methods, such as systemd timers , exist for scheduling jobs. If another method is used, cron should be removed, and the alternate method should be secured in accordance with local site policy

                                                                                                            Granting write access to this directory for non-privileged users could provide them the means for gaining unauthorized elevated privileges. Granting read access to this directory could give an unprivileged user insight in how to gain elevated privileges or circumvent auditing controls.

                                                                                                            Run the following commands to set ownership and permissions on the /etc/cron.d directory:

                                                                                                            # chown root:root /etc/cron.d/



                                                                                                            # chmod og-rwx /etc/cron.d/

                                                                                                            Show Assessment Evidence
                                                                                                            Complex Check
                                                                                                            OR
                                                                                                            Criterion: Ensure at least one file named /etc/cron.d/ exists and is owned by 0:0 and does not have permissions ---rwxrwx
                                                                                                            Existence Check: At Least One Exists
                                                                                                            Item Check: All
                                                                                                            Result: Fail
                                                                                                            File Item
                                                                                                            Name Type Status Value
                                                                                                            Path String Exists /etc/cron.d
                                                                                                            Filename String Exists No Value
                                                                                                            Type String Exists directory
                                                                                                            Group Id Int Exists 0
                                                                                                            User Id Int Exists 0
                                                                                                            A Time Int Exists 1636876986
                                                                                                            C Time Int Exists 1636876986
                                                                                                            M Time Int Exists 1636876986
                                                                                                            Size Int Exists 4096
                                                                                                            Suid Int Exists false
                                                                                                            Sgid Boolean Exists false
                                                                                                            Sticky Boolean Exists false
                                                                                                            Uread Boolean Exists true
                                                                                                            Uwrite Boolean Exists true
                                                                                                            Uexec Boolean Exists true
                                                                                                            Gread Boolean Exists true
                                                                                                            Gwrite Boolean Exists false
                                                                                                            Gexec Boolean Exists true
                                                                                                            Oread Boolean Exists true
                                                                                                            Owrite Boolean Exists false
                                                                                                            Oexec Boolean Exists true
                                                                                                            Has Extended Acl Boolean Not collected No Value
                                                                                                            Criterion: Ensure package name equals 'cron' is not installed
                                                                                                            Existence Check: None Exist
                                                                                                            Item Check: All
                                                                                                            Result: Fail
                                                                                                            Dpkginfo Item
                                                                                                            Name Type Status Value
                                                                                                            Name String Exists cron
                                                                                                            Arch String Exists amd64
                                                                                                            Epoch String Exists (none)
                                                                                                            Release String Exists 128.1ubuntu1
                                                                                                            Version String Exists 3.0pl1
                                                                                                            Evr Evr String Exists 0:3.0pl1-128.1ubuntu1


                                                                                                            Show Rule Result XML

                                                                                                            References:

                                                                                                              CIS Controls V7.0:

                                                                                                              • Control 14: Controlled Access Based on the Need to Know: -- More

                                                                                                              Fail

                                                                                                              5.1.8 Ensure cron is restricted to authorized users

                                                                                                              Description:

                                                                                                              Configure /etc/cron.allow to allow specific users to use this service. If /etc/cron.allow does not exist, then /etc/cron.deny is checked. Any user not specifically defined in this file is allowed to use cron. By removing the file, only users in /etc/cron.allow are allowed to use cron.

                                                                                                              Notes:

                                                                                                              • Other methods, such as systemd timers , exist for scheduling jobs. If another method is used, cron should be removed, and the alternate method should be secured in accordance with local site policy
                                                                                                              • Even though a given user is not listed in cron.allow , cron jobs can still be run as that user
                                                                                                              • The cron.allow file only controls administrative access to the crontab command for scheduling and modifying cron jobs

                                                                                                              On many systems, only the system administrator is authorized to schedule cron jobs. Using the cron.allow file to control who can run cron jobs enforces this policy. It is easier to manage an allow list than a deny list. In a deny list, you could potentially add a user ID to the system and forget to add it to the deny files.

                                                                                                              Run the following commands to remove /etc/cron.deny :

                                                                                                              # rm /etc/cron.deny

                                                                                                              Run the following command to create /etc/cron.allow

                                                                                                              # touch /etc/cron.allow

                                                                                                              Run the following commands to set permissions and ownership for /etc/cron.allow :

                                                                                                              # chmod g-wx,o-rwx /etc/cron.allow



                                                                                                              # chown root:root /etc/cron.allow

                                                                                                              Show Assessment Evidence
                                                                                                              Complex Check
                                                                                                              OR
                                                                                                              Complex Check
                                                                                                              AND
                                                                                                              Criterion: Ensure at least one file named /etc/cron.allow exists and is owned by 0:0 and does not have permissions ----wxrwx
                                                                                                              Existence Check: At Least One Exists
                                                                                                              Item Check: All
                                                                                                              Result: Fail
                                                                                                              No matching system items were found.
                                                                                                              Criterion: Ensure no file named /etc/cron.deny exists and unknown test
                                                                                                              Existence Check: None Exist
                                                                                                              Item Check: All
                                                                                                              Result: Pass
                                                                                                              No matching system items were found.
                                                                                                              Criterion: Ensure package name equals 'cron' is not installed
                                                                                                              Existence Check: None Exist
                                                                                                              Item Check: All
                                                                                                              Result: Fail
                                                                                                              Dpkginfo Item
                                                                                                              Name Type Status Value
                                                                                                              Name String Exists cron
                                                                                                              Arch String Exists amd64
                                                                                                              Epoch String Exists (none)
                                                                                                              Release String Exists 128.1ubuntu1
                                                                                                              Version String Exists 3.0pl1
                                                                                                              Evr Evr String Exists 0:3.0pl1-128.1ubuntu1


                                                                                                              Show Rule Result XML

                                                                                                              References:

                                                                                                                CIS Controls V7.0:

                                                                                                                • Control 14: Controlled Access Based on the Need to Know: -- More

                                                                                                                5.2 Configure sudo

                                                                                                                sudo allows a permitted user to execute a command as the superuser or another user, as specified by the security policy. The invoking user's real (not effective) user ID is used to determine the user name with which to query the security policy.

                                                                                                                sudo supports a plugin architecture for security policies and input/output logging. Third parties can develop and distribute their own policy and I/O logging plugins to work seamlessly with the sudo front end. The default security policy is sudoers, which is configured via the file /etc/sudoers.

                                                                                                                Fail

                                                                                                                5.2.2 Ensure sudo commands use pty

                                                                                                                Description:

                                                                                                                sudo can be configured to run only from a pseudo-pty

                                                                                                                Note: visudo edits the sudoers file in a safe fashion, analogous to vipw(8). visudo locks the sudoers file against multiple simultaneous edits, provides basic sanity checks, and checks or parse errors. If the sudoers file is currently being edited you will receive a message to try again later.

                                                                                                                Attackers can run a malicious program using sudo, which would again fork a background process that remains even when the main program has finished executing.

                                                                                                                Edit the file /etc/sudoers or a file in /etc/sudoers.d/ with visudo -f and add the following line:

                                                                                                                Defaults use_pty

                                                                                                                Show Assessment Evidence
                                                                                                                Complex Check
                                                                                                                OR
                                                                                                                Criterion: Ensure at least one file named /etc/sudoers exists and matches pattern ^(?i)\s*Defaults\s+([^#]+,\s*)?use_pty(,\s+\S+\s*)*(\s+#.*)?$
                                                                                                                Existence Check: At Least One Exists
                                                                                                                Item Check: All
                                                                                                                Result: Fail
                                                                                                                No matching system items were found.
                                                                                                                Criterion: Ensure at least one file(s) named ^.+$ in /etc/sudoers.d/ exists and matches pattern ^(?i)\s*Defaults\s+([^#]+,\s*)?use_pty(,\s+\S+\s*)*(\s+#.*)?$
                                                                                                                Existence Check: At Least One Exists
                                                                                                                Item Check: All
                                                                                                                Result: Fail
                                                                                                                No matching system items were found.


                                                                                                                Show Rule Result XML

                                                                                                                References:

                                                                                                                • URL: SUDO(8)

                                                                                                                CIS Controls V7.0:

                                                                                                                • Control 4: Controlled Use of Administrative Privileges: -- More

                                                                                                                Fail

                                                                                                                5.2.3 Ensure sudo log file exists

                                                                                                                Description:

                                                                                                                sudo can use a custom log file.

                                                                                                                Note: visudo edits the sudoers file in a safe fashion, analogous to vipw(8). visudo locks the sudoers file against multiple simultaneous edits, provides basic sanity checks, and checks or parse errors. If the sudoers file is currently being edited you will receive a message to try again later.

                                                                                                                A sudo log file simplifies auditing of sudo commands

                                                                                                                Edit the file /etc/sudoers or a file in /etc/sudoers.d/ with visudo -f and add the following line: and add the following line:

                                                                                                                Defaults logfile="<PATH TO CUSTOM LOG FILE>"

                                                                                                                Example:

                                                                                                                Defaults logfile="/var/log/sudo.log"

                                                                                                                Show Assessment Evidence
                                                                                                                Complex Check
                                                                                                                OR
                                                                                                                Criterion: Ensure at least one file named /etc/sudoers exists and matches pattern ^(?i)\s*Defaults\s+([^#]+,\s*)?logfile=(")?\S+(")?(,\s+\S+\s*)*(\s+#.*)?$
                                                                                                                Existence Check: At Least One Exists
                                                                                                                Item Check: All
                                                                                                                Result: Fail
                                                                                                                No matching system items were found.
                                                                                                                Criterion: Ensure at least one file(s) named ^.+$ in /etc/sudoers.d/ exists and matches pattern ^(?i)\s*Defaults\s+([^#]+,\s*)?logfile=(")?\S+(")?(,\s+\S+\s*)*(\s+#.*)?$
                                                                                                                Existence Check: At Least One Exists
                                                                                                                Item Check: All
                                                                                                                Result: Fail
                                                                                                                No matching system items were found.


                                                                                                                Show Rule Result XML

                                                                                                                References:

                                                                                                                  CIS Controls V7.0:

                                                                                                                  • Control 6: Maintenance, Monitoring and Analysis of Audit Logs: -- More

                                                                                                                  5.3 Configure SSH Server

                                                                                                                  SSH is a secure, encrypted replacement for common login services such as telnet , ftp , rlogin , rsh , and rcp . It is strongly recommended that sites abandon older clear-text login protocols and use SSH to prevent session hijacking and sniffing of sensitive data off the network.

                                                                                                                  Note:

                                                                                                                  • The recommendations in this section only apply if the SSH daemon is installed on the system, if remote access is not required the SSH daemon can be removed and this section skipped.
                                                                                                                    • Command to remove the SSH daemon:# apt purge openssh-server
                                                                                                                  • Once all configuration changes have been made to /etc/ssh/sshd_config , the sshd configuration must be reloaded:
                                                                                                                    • Command to re-load the SSH daemon configuration:# systemctl reload sshd
                                                                                                                  Fail

                                                                                                                  5.3.1 Ensure permissions on /etc/ssh/sshd_config are configured

                                                                                                                  Description:

                                                                                                                  The /etc/ssh/sshd_config file contains configuration specifications for sshd . The command below sets the owner and group of the file to root.

                                                                                                                  The /etc/ssh/sshd_config file needs to be protected from unauthorized changes by non-privileged users.

                                                                                                                  Run the following commands to set ownership and permissions on /etc/ssh/sshd_config :

                                                                                                                  # chown root:root /etc/ssh/sshd_config



                                                                                                                  # chmod og-rwx /etc/ssh/sshd_config

                                                                                                                  Show Assessment Evidence
                                                                                                                  Complex Check
                                                                                                                  OR
                                                                                                                  Criterion: Ensure at least one file named /etc/ssh/sshd_config exists and is owned by 0:0 and does not have permissions ---rwxrwx
                                                                                                                  Existence Check: At Least One Exists
                                                                                                                  Item Check: All
                                                                                                                  Result: Fail
                                                                                                                  File Item
                                                                                                                  Name Type Status Value
                                                                                                                  Filepath String Exists /etc/ssh/sshd_config
                                                                                                                  Path String Exists /etc/ssh
                                                                                                                  Filename String Exists sshd_config
                                                                                                                  Type String Exists regular
                                                                                                                  Group Id Int Exists 0
                                                                                                                  User Id Int Exists 0
                                                                                                                  A Time Int Exists 1626811552
                                                                                                                  C Time Int Exists 1626839047
                                                                                                                  M Time Int Exists 1626811552
                                                                                                                  Size Int Exists 3284
                                                                                                                  Suid Int Exists false
                                                                                                                  Sgid Boolean Exists false
                                                                                                                  Sticky Boolean Exists false
                                                                                                                  Uread Boolean Exists true
                                                                                                                  Uwrite Boolean Exists true
                                                                                                                  Uexec Boolean Exists false
                                                                                                                  Gread Boolean Exists true
                                                                                                                  Gwrite Boolean Exists false
                                                                                                                  Gexec Boolean Exists false
                                                                                                                  Oread Boolean Exists true
                                                                                                                  Owrite Boolean Exists false
                                                                                                                  Oexec Boolean Exists false
                                                                                                                  Has Extended Acl Boolean Not collected No Value
                                                                                                                  Criterion: Ensure package name equals 'openssh-server' is not installed
                                                                                                                  Existence Check: None Exist
                                                                                                                  Item Check: All
                                                                                                                  Result: Fail
                                                                                                                  Dpkginfo Item
                                                                                                                  Name Type Status Value
                                                                                                                  Name String Exists openssh-server
                                                                                                                  Arch String Exists amd64
                                                                                                                  Epoch String Exists 1
                                                                                                                  Release String Exists 4ubuntu0.3
                                                                                                                  Version String Exists 7.6p1
                                                                                                                  Evr Evr String Exists 1:7.6p1-4ubuntu0.3


                                                                                                                  Show Rule Result XML

                                                                                                                  References:

                                                                                                                    CIS Controls V7.0:

                                                                                                                    • Control 14: Controlled Access Based on the Need to Know: -- More

                                                                                                                    Fail

                                                                                                                    5.3.4 Ensure SSH access is limited

                                                                                                                    Description:

                                                                                                                    There are several options available to limit which users and group can access the system via SSH. It is recommended that at least one of the following options be leveraged:

                                                                                                                    • AllowUsers :
                                                                                                                      • The AllowUsers variable gives the system administrator the option of allowing specific users to ssh into the system. The list consists of space separated user names. Numeric user IDs are not recognized with this variable. If a system administrator wants to restrict user access further by only allowing the allowed users to log in from a particular host, the entry can be specified in the form of user@host.
                                                                                                                    • AllowGroups :
                                                                                                                      • The AllowGroups variable gives the system administrator the option of allowing specific groups of users to ssh into the system. The list consists of space separated group names. Numeric group IDs are not recognized with this variable.
                                                                                                                    • DenyUsers :
                                                                                                                      • The DenyUsers variable gives the system administrator the option of denying specific users to ssh into the system. The list consists of space separated user names. Numeric user IDs are not recognized with this variable. If a system administrator wants to restrict user access further by specifically denying a user's access from a particular host, the entry can be specified in the form of user@host.
                                                                                                                    • DenyGroups :
                                                                                                                      • The DenyGroups variable gives the system administrator the option of denying specific groups of users to ssh into the system. The list consists of space separated group names. Numeric group IDs are not recognized with this variable.

                                                                                                                    Restricting which users can remotely access the system via SSH will help ensure that only authorized users access the system.

                                                                                                                    Edit the /etc/ssh/sshd_config file to set one or more of the parameter as follows:

                                                                                                                    AllowUsers <userlist>

                                                                                                                    OR

                                                                                                                    AllowGroups <grouplist>

                                                                                                                    OR

                                                                                                                    DenyUsers <userlist>

                                                                                                                    OR

                                                                                                                    DenyGroups <grouplist>

                                                                                                                    Show Assessment Evidence
                                                                                                                    Complex Check
                                                                                                                    OR
                                                                                                                    Script: sce/sshd_running_config.sh
                                                                                                                    Result: Fail
                                                                                                                    Exit Value: 102
                                                                                                                    Output:
                                                                                                                    • FAILED! check sshd parameter: "allowusers|allowgroups|denyusers|denygroups"
                                                                                                                    No error lines were collected.
                                                                                                                    Criterion: Ensure package name equals 'openssh-server' is not installed
                                                                                                                    Existence Check: None Exist
                                                                                                                    Item Check: All
                                                                                                                    Result: Fail
                                                                                                                    Dpkginfo Item
                                                                                                                    Name Type Status Value
                                                                                                                    Name String Exists openssh-server
                                                                                                                    Arch String Exists amd64
                                                                                                                    Epoch String Exists 1
                                                                                                                    Release String Exists 4ubuntu0.3
                                                                                                                    Version String Exists 7.6p1
                                                                                                                    Evr Evr String Exists 1:7.6p1-4ubuntu0.3


                                                                                                                    Show Rule Result XML

                                                                                                                    References:

                                                                                                                    • URL: SSHD_CONFIG(5)

                                                                                                                    CIS Controls V7.0:

                                                                                                                    • Control 4: Controlled Use of Administrative Privileges: -- More

                                                                                                                    Fail

                                                                                                                    5.3.7 Ensure SSH MaxAuthTries is set to 4 or less

                                                                                                                    Description:

                                                                                                                    The MaxAuthTries parameter specifies the maximum number of authentication attempts permitted per connection. When the login failure count reaches half the number, error messages will be written to the syslog file detailing the login failure.

                                                                                                                    Setting the MaxAuthTries parameter to a low number will minimize the risk of successful brute force attacks to the SSH server. While the recommended setting is 4, set the number based on site policy.

                                                                                                                    Edit the /etc/ssh/sshd_config file to set the parameter as follows:

                                                                                                                    MaxAuthTries 4

                                                                                                                    Show Assessment Evidence
                                                                                                                    Complex Check
                                                                                                                    OR
                                                                                                                    Complex Check
                                                                                                                    AND
                                                                                                                    Script: sce/sshd_running_config.sh
                                                                                                                    Result: Fail
                                                                                                                    Exit Value: 102
                                                                                                                    Output:
                                                                                                                    • FAILED! check sshd parameter: "maxauthtries 6"
                                                                                                                    No error lines were collected.
                                                                                                                    Criterion: Ensure no file named /etc/ssh/sshd_config exists and matches pattern ^(?i)\s*maxauthtries\s+([5-9]|[1-9][0-9]+)
                                                                                                                    Existence Check: None Exist
                                                                                                                    Item Check: All
                                                                                                                    Result: Pass
                                                                                                                    No matching system items were found.
                                                                                                                    Criterion: Ensure package name equals 'openssh-server' is not installed
                                                                                                                    Existence Check: None Exist
                                                                                                                    Item Check: All
                                                                                                                    Result: Fail
                                                                                                                    Dpkginfo Item
                                                                                                                    Name Type Status Value
                                                                                                                    Name String Exists openssh-server
                                                                                                                    Arch String Exists amd64
                                                                                                                    Epoch String Exists 1
                                                                                                                    Release String Exists 4ubuntu0.3
                                                                                                                    Version String Exists 7.6p1
                                                                                                                    Evr Evr String Exists 1:7.6p1-4ubuntu0.3


                                                                                                                    Show Rule Result XML

                                                                                                                    References:

                                                                                                                    • URL: SSHD_CONFIG(5)

                                                                                                                    CIS Controls V7.0:

                                                                                                                    • Control 16: Account Monitoring and Control: -- More

                                                                                                                    Fail

                                                                                                                    5.3.10 Ensure SSH root login is disabled

                                                                                                                    Description:

                                                                                                                    The PermitRootLogin parameter specifies if the root user can log in using ssh. The default is no.

                                                                                                                    Disallowing root logins over SSH requires system admins to authenticate using their own individual account, then escalating to root via sudo . This in turn limits opportunity for non-repudiation and provides a clear audit trail in the event of a security incident

                                                                                                                    Edit the /etc/ssh/sshd_config file to set the parameter as follows:

                                                                                                                    PermitRootLogin no

                                                                                                                    Show Assessment Evidence
                                                                                                                    Complex Check
                                                                                                                    OR
                                                                                                                    Complex Check
                                                                                                                    AND
                                                                                                                    Script: sce/sshd_running_config.sh
                                                                                                                    Result: Fail
                                                                                                                    Exit Value: 102
                                                                                                                    Output:
                                                                                                                    • FAILED! check sshd parameter: "permitrootlogin yes"
                                                                                                                    No error lines were collected.
                                                                                                                    Criterion: Ensure no file named /etc/ssh/sshd_config exists and matches pattern ^(?i)\s*PermitRootLogin\s+yes
                                                                                                                    Existence Check: None Exist
                                                                                                                    Item Check: All
                                                                                                                    Result: Fail
                                                                                                                    Textfilecontent Item
                                                                                                                    Name Type Status Value
                                                                                                                    Filepath String Exists /etc/ssh/sshd_config
                                                                                                                    Path String Exists /etc/ssh
                                                                                                                    Filename String Exists sshd_config
                                                                                                                    Pattern String Exists ^(?i)\s*PermitRootLogin\s+yes
                                                                                                                    Instance Int Exists 1
                                                                                                                    Line String Exists PermitRootLogin yes
                                                                                                                    Text String Exists PermitRootLogin yes
                                                                                                                    Subexpression String Does not exist No Value
                                                                                                                    Windows View String Not collected No Value
                                                                                                                    Criterion: Ensure package name equals 'openssh-server' is not installed
                                                                                                                    Existence Check: None Exist
                                                                                                                    Item Check: All
                                                                                                                    Result: Fail
                                                                                                                    Dpkginfo Item
                                                                                                                    Name Type Status Value
                                                                                                                    Name String Exists openssh-server
                                                                                                                    Arch String Exists amd64
                                                                                                                    Epoch String Exists 1
                                                                                                                    Release String Exists 4ubuntu0.3
                                                                                                                    Version String Exists 7.6p1
                                                                                                                    Evr Evr String Exists 1:7.6p1-4ubuntu0.3


                                                                                                                    Show Rule Result XML

                                                                                                                    References:

                                                                                                                    • URL: SSHD_CONFIG(5)

                                                                                                                    CIS Controls V7.0:

                                                                                                                    • Control 4: Controlled Use of Administrative Privileges: -- More

                                                                                                                    Fail

                                                                                                                    5.3.14 Ensure only strong MAC algorithms are used

                                                                                                                    Description:

                                                                                                                    This variable Specifies the available MAC (message authentication code) algorithms. The MAC algorithm is used in protocol version 2 for data integrity protection. Multiple algorithms must be comma-separated.

                                                                                                                    MD5 and 96-bit MAC algorithms are considered weak and have been shown to increase exploitability in SSH downgrade attacks. Weak algorithms continue to have a great deal of attention as a weak spot that can be exploited with expanded computing power. An attacker that breaks the algorithm could take advantage of a MiTM position to decrypt the SSH tunnel and capture credentials and information

                                                                                                                    Edit the /etc/ssh/sshd_config file and add/modify the MACs line to contain a comma separated list of the site approved MACs

                                                                                                                    Example:

                                                                                                                    MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512,hmac-sha2-256

                                                                                                                    Show Assessment Evidence
                                                                                                                    Complex Check
                                                                                                                    OR
                                                                                                                    Complex Check
                                                                                                                    AND
                                                                                                                    Script: sce/sshd_running_config_nm.sh
                                                                                                                    Result: Fail
                                                                                                                    Exit Value: 102
                                                                                                                    Output:
                                                                                                                    • FAILED! check sshd parameter: "macs umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1"
                                                                                                                    No error lines were collected.
                                                                                                                    Criterion: Ensure no file named /etc/ssh/sshd_config exists and matches pattern ^(?i)\s*macs\s+([^#]+,)?(hmac-md5|hmac-md5-96|hmac-ripemd160|hmac-sha1|hmac-sha1-96|umac-64@openssh\.com|hmac-md5-etm@openssh\.com|hmac-md5-96-etm@openssh\.com|hmac-ripemd160-etm@openssh
                                                                                                                    Existence Check: None Exist
                                                                                                                    Item Check: All
                                                                                                                    Result: Pass
                                                                                                                    No matching system items were found.
                                                                                                                    Criterion: Ensure package name equals 'openssh-server' is not installed
                                                                                                                    Existence Check: None Exist
                                                                                                                    Item Check: All
                                                                                                                    Result: Fail
                                                                                                                    Dpkginfo Item
                                                                                                                    Name Type Status Value
                                                                                                                    Name String Exists openssh-server
                                                                                                                    Arch String Exists amd64
                                                                                                                    Epoch String Exists 1
                                                                                                                    Release String Exists 4ubuntu0.3
                                                                                                                    Version String Exists 7.6p1
                                                                                                                    Evr Evr String Exists 1:7.6p1-4ubuntu0.3


                                                                                                                    Show Rule Result XML

                                                                                                                    References:

                                                                                                                    • URL: More information on SSH downgrade attacks can be found here: http://www.mitls.org/pages/attacks/SLOTH
                                                                                                                    • URL: SSHD_CONFIG(5)

                                                                                                                    CIS Controls V7.0:

                                                                                                                    • Control 14: Controlled Access Based on the Need to Know: -- More
                                                                                                                    • Control 16: Account Monitoring and Control: -- More

                                                                                                                    Fail

                                                                                                                    5.3.15 Ensure only strong Key Exchange algorithms are used

                                                                                                                    Description:

                                                                                                                    Key exchange is any method in cryptography by which cryptographic keys are exchanged between two parties, allowing use of a cryptographic algorithm. If the sender and receiver wish to exchange encrypted messages, each must be equipped to encrypt messages to be sent and decrypt messages received

                                                                                                                    Key exchange methods that are considered weak should be removed. A key exchange method may be weak because too few bits are used or the hashing algorithm is considered too weak. Using weak algorithms could expose connections to man-in-the-middle attacks

                                                                                                                    Edit the /etc/ssh/sshd_config file add/modify the KexAlgorithms line to contain a comma separated list of the site approved key exchange algorithms

                                                                                                                    Example:

                                                                                                                    KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256

                                                                                                                    Show Assessment Evidence
                                                                                                                    Complex Check
                                                                                                                    OR
                                                                                                                    Complex Check
                                                                                                                    AND
                                                                                                                    Script: sce/sshd_running_config_nm.sh
                                                                                                                    Result: Fail
                                                                                                                    Exit Value: 102
                                                                                                                    Output:
                                                                                                                    • FAILED! check sshd parameter: "kexalgorithms curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1"
                                                                                                                    No error lines were collected.
                                                                                                                    Criterion: Ensure no file named /etc/ssh/sshd_config exists and matches pattern ^(?i)\s*kexalgorithms\s+([^#]+,)?(diffie-hellman-group1-sha1|diffie-hellman-group14-sha1|diffie-hellman-group-exchange-sha1)\b
                                                                                                                    Existence Check: None Exist
                                                                                                                    Item Check: All
                                                                                                                    Result: Pass
                                                                                                                    No matching system items were found.
                                                                                                                    Criterion: Ensure package name equals 'openssh-server' is not installed
                                                                                                                    Existence Check: None Exist
                                                                                                                    Item Check: All
                                                                                                                    Result: Fail
                                                                                                                    Dpkginfo Item
                                                                                                                    Name Type Status Value
                                                                                                                    Name String Exists openssh-server
                                                                                                                    Arch String Exists amd64
                                                                                                                    Epoch String Exists 1
                                                                                                                    Release String Exists 4ubuntu0.3
                                                                                                                    Version String Exists 7.6p1
                                                                                                                    Evr Evr String Exists 1:7.6p1-4ubuntu0.3


                                                                                                                    Show Rule Result XML

                                                                                                                    References:

                                                                                                                    • URL: SSHD_CONFIG(5)

                                                                                                                    CIS Controls V7.0:

                                                                                                                    • Control 14: Controlled Access Based on the Need to Know: -- More

                                                                                                                    Fail

                                                                                                                    5.3.16 Ensure SSH Idle Timeout Interval is configured

                                                                                                                    Description:

                                                                                                                    The two options ClientAliveInterval and ClientAliveCountMax control the timeout of ssh sessions.

                                                                                                                    • ClientAliveInterval sets a timeout interval in seconds after which if no data has been received from the client, sshd will send a message through the encrypted channel to request a response from the client. The default is 0, indicating that these messages will not be sent to the client.
                                                                                                                    • ClientAliveCountMax sets the number of client alive messages which may be sent without sshd receiving any messages back from the client. If this threshold is reached while client alive messages are being sent, sshd will disconnect the client, terminating the session. The default value is 3 .
                                                                                                                      • The client alive messages are sent through the encrypted channel
                                                                                                                      • Setting ClientAliveCountMax to 0 disables connection termination

                                                                                                                    Example: The default value is 3. If ClientAliveInterval is set to 15, and ClientAliveCountMax is left at the default, unresponsive SSH clients will be disconnected after approximately 45 seconds

                                                                                                                    Having no timeout value associated with a connection could allow an unauthorized user access to another user's ssh session (e.g. user walks away from their computer and doesn't lock the screen). Setting a timeout value reduces this risk.

                                                                                                                    • The recommended ClientAliveInterval setting is no greater than 900 seconds (15 minutes)
                                                                                                                    • The recommended ClientAliveCountMax setting is 0
                                                                                                                    • At the 15 minute interval, if the ssh session is inactive, the session will be terminated.

                                                                                                                    Edit the /etc/ssh/sshd_config file to set the parameters according to site policy. This should include ClientAliveInterval between 1 and 900 and ClientAliveCountMax of 0 :

                                                                                                                    ClientAliveInterval 900



                                                                                                                    ClientAliveCountMax 0

                                                                                                                    Impact:

                                                                                                                    In some cases this setting may cause termination of long-running scripts over SSH or remote automation tools which rely on SSH. In developing the local site policy, the requirements of such scripts should be considered and appropriate ServerAliveInterval and ClientAliveInterval settings should be calculated to insure operational continuity.

                                                                                                                    Show Assessment Evidence
                                                                                                                    Complex Check
                                                                                                                    OR
                                                                                                                    Complex Check
                                                                                                                    AND
                                                                                                                    Complex Check
                                                                                                                    AND
                                                                                                                    Complex Check
                                                                                                                    AND
                                                                                                                    Script: sce/sshd_running_config.sh
                                                                                                                    Result: Fail
                                                                                                                    Exit Value: 102
                                                                                                                    Output:
                                                                                                                    • FAILED! check sshd parameter: "clientaliveinterval 0"
                                                                                                                    No error lines were collected.
                                                                                                                    Script: sce/sshd_running_config.sh
                                                                                                                    Result: Fail
                                                                                                                    Exit Value: 102
                                                                                                                    Output:
                                                                                                                    • FAILED! check sshd parameter: "clientalivecountmax 3"
                                                                                                                    No error lines were collected.
                                                                                                                    Criterion: Ensure no file named /etc/ssh/sshd_config exists and matches pattern ^\s*(?i)clientaliveinterval\s+(0|9[0-9][1-9]|[1-9][0-9][0-9][0-9]+|1[6-9]m|[2-9][0-9]m|[1-9][0-9][0-9]+m)\b
                                                                                                                    Existence Check: None Exist
                                                                                                                    Item Check: All
                                                                                                                    Result: Pass
                                                                                                                    No matching system items were found.
                                                                                                                    Criterion: Ensure no file named /etc/ssh/sshd_config exists and matches pattern ^(?i)\s*ClientAliveCountMax\s+([1-9]|[1-9][0-9]+)\b
                                                                                                                    Existence Check: None Exist
                                                                                                                    Item Check: All
                                                                                                                    Result: Pass
                                                                                                                    No matching system items were found.
                                                                                                                    Criterion: Ensure package name equals 'openssh-server' is not installed
                                                                                                                    Existence Check: None Exist
                                                                                                                    Item Check: All
                                                                                                                    Result: Fail
                                                                                                                    Dpkginfo Item
                                                                                                                    Name Type Status Value
                                                                                                                    Name String Exists openssh-server
                                                                                                                    Arch String Exists amd64
                                                                                                                    Epoch String Exists 1
                                                                                                                    Release String Exists 4ubuntu0.3
                                                                                                                    Version String Exists 7.6p1
                                                                                                                    Evr Evr String Exists 1:7.6p1-4ubuntu0.3


                                                                                                                    Show Rule Result XML

                                                                                                                    References:

                                                                                                                    • URL: https://man.openbsd.org/sshd_config

                                                                                                                    CIS Controls V7.0:

                                                                                                                    • Control 16: Account Monitoring and Control: -- More

                                                                                                                    Fail

                                                                                                                    5.3.17 Ensure SSH LoginGraceTime is set to one minute or less

                                                                                                                    Description:

                                                                                                                    The LoginGraceTime parameter specifies the time allowed for successful authentication to the SSH server. The longer the Grace period is the more open unauthenticated connections can exist. Like other session controls in this session the Grace Period should be limited to appropriate organizational limits to ensure the service is available for needed access.

                                                                                                                    Setting the LoginGraceTime parameter to a low number will minimize the risk of successful brute force attacks to the SSH server. It will also limit the number of concurrent unauthenticated connections While the recommended setting is 60 seconds (1 Minute), set the number based on site policy.

                                                                                                                    Edit the /etc/ssh/sshd_config file to set the parameter as follows:

                                                                                                                    LoginGraceTime 60

                                                                                                                    Show Assessment Evidence
                                                                                                                    Complex Check
                                                                                                                    OR
                                                                                                                    Complex Check
                                                                                                                    AND
                                                                                                                    Script: sce/sshd_running_config.sh
                                                                                                                    Result: Fail
                                                                                                                    Exit Value: 102
                                                                                                                    Output:
                                                                                                                    • FAILED! check sshd parameter: "logingracetime 120"
                                                                                                                    No error lines were collected.
                                                                                                                    Criterion: Ensure no file named /etc/ssh/sshd_config exists and matches pattern ^(?i)\s*LoginGraceTime\s+(0|6[1-9]|[7-9][0-9]|[1-9][0-9][0-9]+|[^1]m)
                                                                                                                    Existence Check: None Exist
                                                                                                                    Item Check: All
                                                                                                                    Result: Pass
                                                                                                                    No matching system items were found.
                                                                                                                    Criterion: Ensure package name equals 'openssh-server' is not installed
                                                                                                                    Existence Check: None Exist
                                                                                                                    Item Check: All
                                                                                                                    Result: Fail
                                                                                                                    Dpkginfo Item
                                                                                                                    Name Type Status Value
                                                                                                                    Name String Exists openssh-server
                                                                                                                    Arch String Exists amd64
                                                                                                                    Epoch String Exists 1
                                                                                                                    Release String Exists 4ubuntu0.3
                                                                                                                    Version String Exists 7.6p1
                                                                                                                    Evr Evr String Exists 1:7.6p1-4ubuntu0.3


                                                                                                                    Show Rule Result XML

                                                                                                                    References:

                                                                                                                    • URL: SSHD_CONFIG(5)

                                                                                                                    CIS Controls V7.0:

                                                                                                                    • Control 5: Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers: -- More

                                                                                                                    Fail

                                                                                                                    5.3.18 Ensure SSH warning banner is configured

                                                                                                                    Description:

                                                                                                                    The Banner parameter specifies a file whose contents must be sent to the remote user before authentication is permitted. By default, no banner is displayed.

                                                                                                                    Banners are used to warn connecting users of the particular site's policy regarding connection. Presenting a warning message prior to the normal user login may assist the prosecution of trespassers on the computer system.

                                                                                                                    Edit the /etc/ssh/sshd_config file to set the parameter as follows:

                                                                                                                    Banner /etc/issue.net

                                                                                                                    Show Assessment Evidence
                                                                                                                    Complex Check
                                                                                                                    OR
                                                                                                                    Script: sce/sshd_running_config.sh
                                                                                                                    Result: Fail
                                                                                                                    Exit Value: 102
                                                                                                                    Output:
                                                                                                                    • FAILED! check sshd parameter: "banner none"
                                                                                                                    No error lines were collected.
                                                                                                                    Criterion: Ensure package name equals 'openssh-server' is not installed
                                                                                                                    Existence Check: None Exist
                                                                                                                    Item Check: All
                                                                                                                    Result: Fail
                                                                                                                    Dpkginfo Item
                                                                                                                    Name Type Status Value
                                                                                                                    Name String Exists openssh-server
                                                                                                                    Arch String Exists amd64
                                                                                                                    Epoch String Exists 1
                                                                                                                    Release String Exists 4ubuntu0.3
                                                                                                                    Version String Exists 7.6p1
                                                                                                                    Evr Evr String Exists 1:7.6p1-4ubuntu0.3


                                                                                                                    Show Rule Result XML

                                                                                                                    References:

                                                                                                                    • URL: SSHD_CONFIG(5)

                                                                                                                    CIS Controls V7.0:

                                                                                                                    • Control 5: Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers: -- More

                                                                                                                    Fail

                                                                                                                    5.3.21 Ensure SSH MaxStartups is configured

                                                                                                                    Description:

                                                                                                                    The MaxStartups parameter specifies the maximum number of concurrent unauthenticated connections to the SSH daemon.

                                                                                                                    To protect a system from denial of service due to a large number of pending authentication connection attempts, use the rate limiting function of MaxStartups to protect availability of sshd logins and prevent overwhelming the daemon.

                                                                                                                    Edit the /etc/ssh/sshd_config file to set the parameter as follows:

                                                                                                                    maxstartups 10:30:60

                                                                                                                    Show Assessment Evidence
                                                                                                                    Complex Check
                                                                                                                    OR
                                                                                                                    Complex Check
                                                                                                                    AND
                                                                                                                    Script: sce/sshd_running_config.sh
                                                                                                                    Result: Fail
                                                                                                                    Exit Value: 102
                                                                                                                    Output:
                                                                                                                    • FAILED! check sshd parameter: "maxstartups 10:30:100"
                                                                                                                    No error lines were collected.
                                                                                                                    Criterion: Ensure no file named /etc/ssh/sshd_config exists and matches pattern ^(?i)\s*maxstartups\s+(((1[1-9]|[1-9][0-9][0-9]+):([0-9]+):([0-9]+))|(([0-9]+):(3[1-9]|[4-9][0-9]|[1-9][0-9][0-9]+):([0-9]+))|(([0-9]+):([0-9]+):(6[1-9]|[7-9][0-9]|[1-9][0-9][0-9]+)))
                                                                                                                    Existence Check: None Exist
                                                                                                                    Item Check: All
                                                                                                                    Result: Pass
                                                                                                                    No matching system items were found.
                                                                                                                    Criterion: Ensure package name equals 'openssh-server' is not installed
                                                                                                                    Existence Check: None Exist
                                                                                                                    Item Check: All
                                                                                                                    Result: Fail
                                                                                                                    Dpkginfo Item
                                                                                                                    Name Type Status Value
                                                                                                                    Name String Exists openssh-server
                                                                                                                    Arch String Exists amd64
                                                                                                                    Epoch String Exists 1
                                                                                                                    Release String Exists 4ubuntu0.3
                                                                                                                    Version String Exists 7.6p1
                                                                                                                    Evr Evr String Exists 1:7.6p1-4ubuntu0.3


                                                                                                                    Show Rule Result XML

                                                                                                                    References:

                                                                                                                    • URL: SSHD_CONFIG(5)

                                                                                                                    CIS Controls V7.0:

                                                                                                                    • Control 5: Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers: -- More

                                                                                                                    5.4 Configure PAM

                                                                                                                    PAM (Pluggable Authentication Modules) is a service that implements modular authentication modules on UNIX systems. PAM is implemented as a set of shared objects that are loaded and executed when a program needs to authenticate a user. Files for PAM are typically located in the /etc/pam.d directory. PAM must be carefully configured to secure system authentication. While this section covers some of PAM, please consult other PAM resources to fully understand the configuration capabilities.

                                                                                                                    Fail

                                                                                                                    5.4.1 Ensure password creation requirements are configured

                                                                                                                    Description:

                                                                                                                    The pam_pwquality.so module checks the strength of passwords. It performs checks such as making sure a password is not a dictionary word, it is a certain length, contains a mix of characters (e.g. alphabet, numeric, other) and more. The following are definitions of the pam_pwquality.so options.

                                                                                                                    The following options are set in the /etc/security/pwquality.conf file:

                                                                                                                    • Password Length:
                                                                                                                      • minlen = 14 - password must be 14 characters or more
                                                                                                                    • Password complexity:
                                                                                                                      • minclass = 4 - The minimum number of required classes of characters for the new password (digits, uppercase, lowercase, others)

                                                                                                                        OR

                                                                                                                      • dcredit = -1 - provide at least one digit

                                                                                                                      • ucredit = -1 - provide at least one uppercase character

                                                                                                                      • ocredit = -1 - provide at least one special character

                                                                                                                      • lcredit = -1 - provide at least one lowercase character

                                                                                                                    The following is st in the /etc/pam.d/common-password file:

                                                                                                                    • retry=3 - Allow 3 tries before sending back a failure. The settings shown above are one possible policy. Alter these values to conform to your own organization's password policies.

                                                                                                                    Strong passwords protect systems from being hacked through brute force methods.

                                                                                                                    Run the following command to install the pam_pwquality module:

                                                                                                                    apt install libpam-pwquality

                                                                                                                    Edit the file /etc/security/pwquality.conf and add or modify the following line for password length to conform to site policy

                                                                                                                    minlen = 14

                                                                                                                    Edit the file /etc/security/pwquality.conf and add or modify the following line for password complexity to conform to site policy

                                                                                                                    minclass = 4

                                                                                                                    OR

                                                                                                                    dcredit = -1

                                                                                                                    ucredit = -1

                                                                                                                    ocredit = -1

                                                                                                                    lcredit = -1

                                                                                                                    Edit the /etc/pam.d/common-password file to include the appropriate options for pam_pwquality.so and to conform to site policy:

                                                                                                                    password requisite pam_pwquality.so retry=3

                                                                                                                    Show Assessment Evidence
                                                                                                                    Complex Check
                                                                                                                    AND
                                                                                                                    Criterion: Ensure at least one file named /etc/security/pwquality.conf exists and matches pattern ^\s*minlen\s*=\s*(1[4-9]|[2-9][0-9]|[1-9][0-9][0-9])(\s+#.*)*$
                                                                                                                    Existence Check: At Least One Exists
                                                                                                                    Item Check: All
                                                                                                                    Result: Fail
                                                                                                                    No matching system items were found.
                                                                                                                    Criterion: Ensure at least one file named /etc/pam.d/common-password exists and matches pattern ^\s*password\s+(requisite|required)\s+pam_pwquality\.so\s+(\S+\s+)*retry=[1-3]\s*(\s+\S+\s*)*(\s+#.*)?$
                                                                                                                    Existence Check: At Least One Exists
                                                                                                                    Item Check: All
                                                                                                                    Result: Fail
                                                                                                                    No matching system items were found.


                                                                                                                    Show Rule Result XML

                                                                                                                    References:

                                                                                                                      CIS Controls V7.0:

                                                                                                                      • Control 4: Controlled Use of Administrative Privileges: -- More

                                                                                                                      Fail

                                                                                                                      5.4.2 Ensure lockout for failed password attempts is configured

                                                                                                                      Description:

                                                                                                                      Lock out users after n unsuccessful consecutive login attempts. The first sets of changes are made to the PAM configuration files. The second set of changes are applied to the program specific PAM configuration file. The second set of changes must be applied to each program that will lock out users. Check the documentation for each secondary program for instructions on how to configure them to work with PAM.

                                                                                                                      • deny= n - n represents the number of failed attempts before the account is locked
                                                                                                                      • unlock_time= n - n represents the number of seconds before the account is unlocked
                                                                                                                      • audit - Will log the user name into the system log if the user is not found.
                                                                                                                      • silent - Don't print informative messages. Set the lockout number and unlock time in accordance with local site policy.

                                                                                                                      Locking out user IDs after n unsuccessful consecutive login attempts mitigates brute force password attacks against your systems.

                                                                                                                      Edit the /etc/pam.d/common-auth file and add the auth line below:

                                                                                                                      auth required pam_tally2.so onerr=fail audit silent deny=5 unlock_time=900

                                                                                                                      Edit the /etc/pam.d/common-account file and add the account lines bellow:

                                                                                                                      account requisite pam_deny.so

                                                                                                                      account required pam_tally2.so

                                                                                                                      Show Assessment Evidence
                                                                                                                      Complex Check
                                                                                                                      AND
                                                                                                                      Complex Check
                                                                                                                      AND
                                                                                                                      Criterion: Ensure /etc/pam.d//common-auth contents Pattern Match deny=[1-5] (string)
                                                                                                                      Existence Check: At Least One Exists
                                                                                                                      Item Check: All
                                                                                                                      Result: Fail
                                                                                                                      No matching system items were found.
                                                                                                                      Criterion: Ensure /etc/pam.d//common-account contents Pattern Match pam_deny\.so (string)
                                                                                                                      Existence Check: At Least One Exists
                                                                                                                      Item Check: All
                                                                                                                      Result: Pass
                                                                                                                      Textfilecontent Item
                                                                                                                      Name Type Status Value
                                                                                                                      Filepath String Exists /etc/pam.d/common-account
                                                                                                                      Path String Exists /etc/pam.d
                                                                                                                      Filename String Exists common-account
                                                                                                                      Pattern String Exists ^\s*account\s+requisite\s*.*$
                                                                                                                      Instance Int Exists 1
                                                                                                                      Line String Exists account requisite pam_deny.so
                                                                                                                      Text String Exists account requisite pam_deny.so
                                                                                                                      Subexpression String Does not exist No Value
                                                                                                                      Windows View String Not collected No Value
                                                                                                                      Criterion: Ensure at least one file named /etc/pam.d/common-account exists and matches pattern ^\s*account\s+required\s+(\S+\s+)*pam_tally2\.so\s*(\s+\S+\s*)*(\s+.*)?$
                                                                                                                      Existence Check: At Least One Exists
                                                                                                                      Item Check: All
                                                                                                                      Result: Fail
                                                                                                                      No matching system items were found.


                                                                                                                      Show Rule Result XML

                                                                                                                      References:

                                                                                                                        CIS Controls V7.0:

                                                                                                                        • Control 16: Account Monitoring and Control: -- More

                                                                                                                        Fail

                                                                                                                        5.4.3 Ensure password reuse is limited

                                                                                                                        Description:

                                                                                                                        The /etc/security/opasswd file stores the users' old passwords and can be checked to ensure that users are not recycling recent passwords.

                                                                                                                        Forcing users not to reuse their past 5 passwords make it less likely that an attacker will be able to guess the password.

                                                                                                                        Edit the /etc/pam.d/common-password file to include the remember option and conform to site policy as shown:

                                                                                                                        password required pam_pwhistory.so remember=5

                                                                                                                        Show Assessment Evidence
                                                                                                                        Complex Check
                                                                                                                        AND
                                                                                                                        Criterion: Ensure at least one file named /etc/pam.d/common-password exists and matches pattern ^\s*password\s+required\s+pam_pwhistory\.so\s+([^#]+\s+)?remember=([5-9]|[1-9][0-9]+)\b
                                                                                                                        Existence Check: At Least One Exists
                                                                                                                        Item Check: All
                                                                                                                        Result: Fail
                                                                                                                        No matching system items were found.


                                                                                                                        Show Rule Result XML

                                                                                                                        References:

                                                                                                                          CIS Controls V7.0:

                                                                                                                          • Control 16: Account Monitoring and Control: -- More

                                                                                                                          5.5 User Accounts and Environment

                                                                                                                          This section provides guidance on setting up secure defaults for system and user accounts and their environment.

                                                                                                                          5.5.1 Set Shadow Password Suite Parameters

                                                                                                                          While a majority of the password control parameters have been moved to PAM, some parameters are still available through the shadow password suite. Any changes made to /etc/login.defs will only be applied if the usermod command is used. If user IDs are added a different way, use the chage command to effect changes to individual user IDs.

                                                                                                                          Fail

                                                                                                                          5.5.1.1 Ensure minimum days between password changes is configured

                                                                                                                          Description:

                                                                                                                          The PASS_MIN_DAYS parameter in /etc/login.defs allows an administrator to prevent users from changing their password until a minimum number of days have passed since the last time the user changed their password. It is recommended that PASS_MIN_DAYS parameter be set to 1 or more days.

                                                                                                                          By restricting the frequency of password changes, an administrator can prevent users from repeatedly changing their password in an attempt to circumvent password reuse controls.

                                                                                                                          Set the PASS_MIN_DAYS parameter to 1 in /etc/login.defs :

                                                                                                                          PASS_MIN_DAYS 1

                                                                                                                          Modify user parameters for all users with a password set to match:

                                                                                                                          # chage --mindays 1 <user>

                                                                                                                          Show Assessment Evidence
                                                                                                                          Complex Check
                                                                                                                          AND
                                                                                                                          Criterion: Ensure at least one file named /etc/login.defs exists and matches pattern ^\s*PASS_MIN_DAYS\s+([1-9]|[1-9][0-9]+)\s*(\s+#.*)?$
                                                                                                                          Existence Check: At Least One Exists
                                                                                                                          Item Check: All
                                                                                                                          Result: Fail
                                                                                                                          No matching system items were found.
                                                                                                                          Criterion: Ensure no file named /etc/shadow exists and matches pattern ^\S+:[^\!\*:]*:[^:]*:(0|\-1):[^:]*:[^:]*:[^:]*:[^:]*:[^:]*\s*$
                                                                                                                          Existence Check: None Exist
                                                                                                                          Item Check: All
                                                                                                                          Result: Fail
                                                                                                                          Textfilecontent Item
                                                                                                                          Name Type Status Value
                                                                                                                          Filepath String Exists /etc/shadow
                                                                                                                          Path String Exists /etc
                                                                                                                          Filename String Exists shadow
                                                                                                                          Pattern String Exists ^\S+:[^\!\*:]*:[^:]*:(0|\-1):[^:]*:[^:]*:[^:]*:[^:]*:[^:]*\s*$
                                                                                                                          Instance Int Exists 1
                                                                                                                          Line String Exists root:$6$xyD2JtAg$18v8Q7.Fj661Tj6xlrq2V1lUwv1gFAo9cGZvip/QCBs6K4xculGxgRxPJrTb4tAcgLqQcI0MVNmxJf84T8OIq/:18828:0:99999:7:::
                                                                                                                          Text String Exists root:$6$xyD2JtAg$18v8Q7.Fj661Tj6xlrq2V1lUwv1gFAo9cGZvip/QCBs6K4xculGxgRxPJrTb4tAcgLqQcI0MVNmxJf84T8OIq/:18828:0:99999:7:::
                                                                                                                          Subexpression String Exists 0
                                                                                                                          Windows View String Not collected No Value


                                                                                                                          Show Rule Result XML

                                                                                                                          References:

                                                                                                                            CIS Controls V7.0:

                                                                                                                            • Control 4: Controlled Use of Administrative Privileges: -- More

                                                                                                                            Fail

                                                                                                                            5.5.1.2 Ensure password expiration is 365 days or less

                                                                                                                            Description:

                                                                                                                            The PASS_MAX_DAYS parameter in /etc/login.defs allows an administrator to force passwords to expire once they reach a defined age.

                                                                                                                            The window of opportunity for an attacker to leverage compromised credentials or successfully compromise credentials via an online brute force attack is limited by the age of the password. Therefore, reducing the maximum age of a password also reduces an attacker's window of opportunity. It is recommended that the PASS_MAX_DAYS parameter does not exceed 365 days and is greater than the value of PASS_MIN_DAYS .

                                                                                                                            Set the PASS_MAX_DAYS parameter to conform to site policy in /etc/login.defs :

                                                                                                                            PASS_MAX_DAYS 365

                                                                                                                            Modify user parameters for all users with a password set to match:

                                                                                                                            # chage --maxdays 365 <user>

                                                                                                                            Show Assessment Evidence
                                                                                                                            Complex Check
                                                                                                                            AND
                                                                                                                            Criterion: Ensure at least one file named /etc/login.defs exists and matches pattern ^\s*(?i)PASS_MAX_DAYS\s+(36[0-5]|3[0-5][0-9]|[1-2][0-9][0-9]|[1-9][0-9]|[2-9])\b
                                                                                                                            Existence Check: At Least One Exists
                                                                                                                            Item Check: All
                                                                                                                            Result: Fail
                                                                                                                            No matching system items were found.
                                                                                                                            Criterion: Ensure no file named /etc/shadow exists and matches pattern ^[^#:]+:[^\!\*:]*:[^:]*:[^:]*:(-1|0|36[6-9]|3[7-9][0-9]|[4-9][0-9][0-9]|[1-9][0-9][0-9][0-9]+):[^:]*:[^:]*:[^:]*:[^:]*\s*$
                                                                                                                            Existence Check: None Exist
                                                                                                                            Item Check: All
                                                                                                                            Result: Fail
                                                                                                                            Textfilecontent Item
                                                                                                                            Name Type Status Value
                                                                                                                            Filepath String Exists /etc/shadow
                                                                                                                            Path String Exists /etc
                                                                                                                            Filename String Exists shadow
                                                                                                                            Pattern String Exists ^[^#:]+:[^\!\*:]*:[^:]*:[^:]*:(\s*|-1|0|36[6-9]|3[7-9][0-9]|[4-9][0-9][0-9]|[1-9][0-9][0-9][0-9]+):[^:]*:[^:]*:[^:]*:[^:]*\s*$
                                                                                                                            Instance Int Exists 1
                                                                                                                            Line String Exists root:$6$xyD2JtAg$18v8Q7.Fj661Tj6xlrq2V1lUwv1gFAo9cGZvip/QCBs6K4xculGxgRxPJrTb4tAcgLqQcI0MVNmxJf84T8OIq/:18828:0:99999:7:::
                                                                                                                            Text String Exists root:$6$xyD2JtAg$18v8Q7.Fj661Tj6xlrq2V1lUwv1gFAo9cGZvip/QCBs6K4xculGxgRxPJrTb4tAcgLqQcI0MVNmxJf84T8OIq/:18828:0:99999:7:::
                                                                                                                            Subexpression String Exists 99999
                                                                                                                            Windows View String Not collected No Value


                                                                                                                            Show Rule Result XML

                                                                                                                            References:

                                                                                                                            • URL: https://www.cisecurity.org/white-papers/cis-password-policy-guide/

                                                                                                                            CIS Controls V7.0:

                                                                                                                            • Control 4: Controlled Use of Administrative Privileges: -- More

                                                                                                                            Fail

                                                                                                                            5.5.1.4 Ensure inactive password lock is 30 days or less

                                                                                                                            Description:

                                                                                                                            User accounts that have been inactive for over a given period of time can be automatically disabled. It is recommended that accounts that are inactive for 30 days after password expiration be disabled.

                                                                                                                            Inactive accounts pose a threat to system security since the users are not logging in to notice failed login attempts or other anomalies.

                                                                                                                            Run the following command to set the default password inactivity period to 30 days:

                                                                                                                            # useradd -D -f 30

                                                                                                                            Modify user parameters for all users with a password set to match:

                                                                                                                            # chage --inactive 30 <user>

                                                                                                                            Show Assessment Evidence
                                                                                                                            Complex Check
                                                                                                                            AND
                                                                                                                            Criterion: Ensure at least one file named /etc/default/useradd exists and matches pattern ^\s*INACTIVE\s*=\s*(30|[1-2][0-9]|[0-9])\b
                                                                                                                            Existence Check: At Least One Exists
                                                                                                                            Item Check: All
                                                                                                                            Result: Fail
                                                                                                                            No matching system items were found.
                                                                                                                            Criterion: Ensure no file named /etc/shadow exists and matches pattern ^[^#:]+:[^\!\*:]*:[^:]*:[^:]*:[^:]*:[^:]*:(\s*|-1|3[1-9]|[4-9][0-9]|[1-9][0-9][0-9]+):[^:]*:[^:]*\s*$
                                                                                                                            Existence Check: None Exist
                                                                                                                            Item Check: All
                                                                                                                            Result: Fail
                                                                                                                            Textfilecontent Item
                                                                                                                            Name Type Status Value
                                                                                                                            Filepath String Exists /etc/shadow
                                                                                                                            Path String Exists /etc
                                                                                                                            Filename String Exists shadow
                                                                                                                            Pattern String Exists ^[^#:]+:[^\!\*:]*:[^:]*:[^:]*:[^:]*:[^:]*:(\s*|-1|3[1-9]|[4-9][0-9]|[1-9][0-9][0-9]+):[^:]*:[^:]*\s*$
                                                                                                                            Instance Int Exists 1
                                                                                                                            Line String Exists root:$6$xyD2JtAg$18v8Q7.Fj661Tj6xlrq2V1lUwv1gFAo9cGZvip/QCBs6K4xculGxgRxPJrTb4tAcgLqQcI0MVNmxJf84T8OIq/:18828:0:99999:7:::
                                                                                                                            Text String Exists root:$6$xyD2JtAg$18v8Q7.Fj661Tj6xlrq2V1lUwv1gFAo9cGZvip/QCBs6K4xculGxgRxPJrTb4tAcgLqQcI0MVNmxJf84T8OIq/:18828:0:99999:7:::
                                                                                                                            Subexpression String Exists No Value
                                                                                                                            Windows View String Not collected No Value


                                                                                                                            Show Rule Result XML

                                                                                                                            References:

                                                                                                                              CIS Controls V7.0:

                                                                                                                              • Control 4: Controlled Use of Administrative Privileges: -- More

                                                                                                                              Fail

                                                                                                                              5.5.4 Ensure default user umask is 027 or more restrictive

                                                                                                                              Description:

                                                                                                                              The user file-creation mode mask ( umask ) is use to determine the file permission for newly created directories and files. In Linux, the default permissions for any newly created directory is 0777 (rwxrwxrwx), and for any newly created file it is 0666 (rw-rw-rw-). The umask modifies the default Linux permissions by restricting (masking) these permissions. The umask is not simply subtracted, but is processed bitwise. Bits set in the umask are cleared in the resulting file mode.

                                                                                                                              umask can be set with either octal or Symbolic values

                                                                                                                              • Octal (Numeric) Value - Represented by either three or four digits. ie umask 0027 or umask 027 . If a four digit umask is used, the first digit is ignored. The remaining three digits effect the resulting permissions for user, group, and world/other respectively.
                                                                                                                              • Symbolic Value - Represented by a comma separated list for User u , group g , and world/other o . The permissions listed are not masked by umask . ie a umask set by umask u=rwx,g=rx,o= is the Symbolic equivalent of the Octalumask 027 . This umask would set a newly created directory with file mode drwxr-x--- and a newly created file with file mode rw-r----- .

                                                                                                                              Setting the default umask :

                                                                                                                              • pam_umask module:
                                                                                                                                • will set the umask according to the system default in /etc/login.defs and user settings, solving the problem of different umask settings with different shells, display managers, remote sessions etc.
                                                                                                                                • umask=<mask> value in the /etc/login.defs file is interpreted as Octal
                                                                                                                                • Setting USERGROUPS_ENAB to yes in /etc/login.defs (default):
                                                                                                                                  • will enable setting of the umask group bits to be the same as owner bits. (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is the same as gid, and username is the same as the primary group name
                                                                                                                                  • userdel will remove the user's group if it contains no more members, and useradd will create by default a group with the name of the user
                                                                                                                              • System Wide Shell Configuration File :
                                                                                                                                • /etc/profile - used to set system wide environmental variables on users shells. The variables are sometimes the same ones that are in the .profile , however this file is used to set an initial PATH or PS1 for all shell users of the system. is only executed for interactive login shells, or shells executed with the --login parameter
                                                                                                                                • /etc/profile.d - /etc/profile will execute the scripts within /etc/profile.d/*.sh . It is recommended to place your configuration in a shell script within /etc/profile.d to set your own system wide environmental variables.
                                                                                                                                • /etc/bash.bashrc - System wide version of .bashrc . etc/bashrc also invokes /etc/profile.d/*.sh if non-login shell, but redirects output to /dev/null if non-interactive. Is only executed for interactive shells or if BASH_ENV is set to /etc/bash.bashrc

                                                                                                                              User Shell Configuration Files:

                                                                                                                              • ~/.profile - Is executed to configure your shell before the initial command prompt. Is only read by login shells.
                                                                                                                              • ~/.bashrc - Is executed for interactive shells. only read by a shell that's both interactive and non-login

                                                                                                                              Setting a very secure default value for umask ensures that users make a conscious choice about their file permissions. A default umask setting of 077 causes files and directories created by users to not be readable by any other user on the system. A umask of 027 would make files and directories readable by users in the same Unix group, while a umask of 022 would make files readable by every user on the system.

                                                                                                                              Run the following command and remove or modify the umask of any returned files:

                                                                                                                              # grep -RPi '(^|^[^#]*)\s*umask\s+([0-7][0-7][01][0-7]\b|[0-7][0-7][0-7][0-6]\b|[0-7][01][0-7]\b|[0-7][0-7][0-6]\b|(u=[rwx]{0,3},)?(g=[rwx]{0,3},)?o=[rwx]+\b|(u=[rwx]{1,3},)?g=[^rx]{1,3}(,o=[rwx]{0,3})?\b)' /etc/login.defs /etc/profile* /etc/bash.bashrc*

                                                                                                                              Follow one of the following methods to set the default user umask:

                                                                                                                              Edit /etc/login.defs and edit the UMASK and USERGROUPS_ENAB lines as follows:

                                                                                                                              UMASK 027



                                                                                                                              USERGROUPS_ENAB no

                                                                                                                              Edit /etc/pam.d/common-session and add or edit the following:

                                                                                                                              session optional pam_umask.so

                                                                                                                              OR

                                                                                                                              Configure umask in one of the following files:

                                                                                                                              • A file in the /etc/profile.d/ directory ending in .sh
                                                                                                                              • /etc/profile
                                                                                                                              • /etc/bash.bashrc

                                                                                                                              Example: /etc/profile.d/set_umask.sh

                                                                                                                              umask 027

                                                                                                                              Note: this method only applies to bash and shell. If other shells are supported on the system, it is recommended that their configuration files also are checked.

                                                                                                                              Impact:

                                                                                                                              Setting USERGROUPS_ENAB no in /etc/login.defs may change the expected behavior of useradd and userdel .

                                                                                                                              Setting USERGROUPS_ENAB yes in /etc/login.defs

                                                                                                                              • userdel will remove the user's group if it contains no more members
                                                                                                                              • useradd will create by default a group with the name of the user.

                                                                                                                              Show Assessment Evidence
                                                                                                                              Complex Check
                                                                                                                              AND
                                                                                                                              Complex Check
                                                                                                                              OR
                                                                                                                              Complex Check
                                                                                                                              OR
                                                                                                                              Complex Check
                                                                                                                              OR
                                                                                                                              Complex Check
                                                                                                                              OR
                                                                                                                              Complex Check
                                                                                                                              AND
                                                                                                                              Complex Check
                                                                                                                              AND
                                                                                                                              Criterion: Ensure at least one file named /etc/login.defs exists and matches pattern (?i)^\s*UMASK\s+(0[0-7][2-7]7|[0-7][2-7]7)\b
                                                                                                                              Existence Check: At Least One Exists
                                                                                                                              Item Check: All
                                                                                                                              Result: Fail
                                                                                                                              No matching system items were found.
                                                                                                                              Criterion: Ensure at least one file named /etc/pam.d/common-session exists and matches pattern ^\s*session\s+(?:optional|requisite|required)\s+pam_umask\.so\b
                                                                                                                              Existence Check: At Least One Exists
                                                                                                                              Item Check: All
                                                                                                                              Result: Pass
                                                                                                                              Textfilecontent Item
                                                                                                                              Name Type Status Value
                                                                                                                              Filepath String Exists /etc/pam.d/common-session
                                                                                                                              Path String Exists /etc/pam.d
                                                                                                                              Filename String Exists common-session
                                                                                                                              Pattern String Exists ^\s*session\s+(?:optional|requisite|required)\s+pam_umask\.so\b
                                                                                                                              Instance Int Exists 1
                                                                                                                              Line String Exists session optional pam_umask.so
                                                                                                                              Text String Exists session optional pam_umask.so
                                                                                                                              Subexpression String Does not exist No Value
                                                                                                                              Windows View String Not collected No Value
                                                                                                                              Criterion: Ensure at least one file named /etc/login.defs exists and matches pattern ^\s*(?i)USERGROUPS_ENAB\s*"?no"?\b
                                                                                                                              Existence Check: At Least One Exists
                                                                                                                              Item Check: All
                                                                                                                              Result: Fail
                                                                                                                              No matching system items were found.
                                                                                                                              Criterion: Ensure at least one file(s) named ^.+\.sh$ in /etc/profile.d/ exists and matches pattern (?i)^\s*UMASK\s+\s*(0[0-7][2-7]7|[0-7][2-7]7|u=(r?|w?|x?)(r?|w?|x?)(r?|w?|x?),g=(r?x?|x?r?),o=)\b
                                                                                                                              Existence Check: At Least One Exists
                                                                                                                              Item Check: All
                                                                                                                              Result: Fail
                                                                                                                              No matching system items were found.
                                                                                                                              Criterion: Ensure at least one file named /etc/profile exists and matches pattern (?i)^\s*UMASK\s+\s*(0[0-7][2-7]7|[0-7][2-7]7|u=(r?|w?|x?)(r?|w?|x?)(r?|w?|x?),g=(r?x?|x?r?),o=)\b
                                                                                                                              Existence Check: At Least One Exists
                                                                                                                              Item Check: All
                                                                                                                              Result: Fail
                                                                                                                              No matching system items were found.
                                                                                                                              Criterion: Ensure at least one file named /etc/bash.bashrc exists and matches pattern (?i)^\s*UMASK\s+\s*(0[0-7][2-7]7|[0-7][2-7]7|u=(r?|w?|x?)(r?|w?|x?)(r?|w?|x?),g=(r?x?|x?r?),o=)\b
                                                                                                                              Existence Check: At Least One Exists
                                                                                                                              Item Check: All
                                                                                                                              Result: Fail
                                                                                                                              No matching system items were found.
                                                                                                                              Criterion: Ensure at least one file named /etc/profile.local exists and matches pattern (?i)^\s*UMASK\s+\s*(0[0-7][2-7]7|[0-7][2-7]7|u=(r?|w?|x?)(r?|w?|x?)(r?|w?|x?),g=(r?x?|x?r?),o=)\b
                                                                                                                              Existence Check: At Least One Exists
                                                                                                                              Item Check: All
                                                                                                                              Result: Fail
                                                                                                                              No matching system items were found.
                                                                                                                              Complex Check
                                                                                                                              AND
                                                                                                                              Complex Check
                                                                                                                              AND
                                                                                                                              Complex Check
                                                                                                                              AND
                                                                                                                              Complex Check
                                                                                                                              AND
                                                                                                                              Criterion: Ensure no file named /etc/login.defs exists and matches pattern (?i)(^\s*|^\s*[^#]+\s+)umask\s+([0-7][0-7][01][0-7]\b|[0-7][0-7][0-7][0-6]\b|[0-7][01][0-7]\b|[0-7][0-7][0-6]\b|(u=[rwx]{0,3},)?(g=[rwx]{0,3},)?o=[rwx]+\b|(u=[rwx]{1,3},)?g=[^rx]{1,3}(,o=[rwx
                                                                                                                              Existence Check: None Exist
                                                                                                                              Item Check: All
                                                                                                                              Result: Fail
                                                                                                                              Textfilecontent Item
                                                                                                                              Name Type Status Value
                                                                                                                              Filepath String Exists /etc/login.defs
                                                                                                                              Path String Exists /etc
                                                                                                                              Filename String Exists login.defs
                                                                                                                              Pattern String Exists (?i)(^\s*|^\s*[^#]+\s+)umask\s+([0-7][0-7][01][0-7]\b|[0-7][0-7][0-7][0-6]\b|[0-7][01][0-7]\b|[0-7][0-7][0-6]\b|(u=[rwx]{0,3},)?(g=[rwx]{0,3},)?o=[rwx]+\b|(u=[rwx]{1,3},)?g=[^rx]{1,3}(,o=[rwx]{0,3})?\b)
                                                                                                                              Instance Int Exists 1
                                                                                                                              Line String Exists ERASECHAR 0177 KILLCHAR 025 UMASK 022
                                                                                                                              Text String Exists ERASECHAR 0177 KILLCHAR 025 UMASK 022
                                                                                                                              Subexpression String Exists ERASECHAR 0177 KILLCHAR 025
                                                                                                                              Subexpression String Exists 022
                                                                                                                              Subexpression String Does not exist No Value
                                                                                                                              Subexpression String Does not exist No Value
                                                                                                                              Subexpression String Does not exist No Value
                                                                                                                              Subexpression String Does not exist No Value
                                                                                                                              Windows View String Not collected No Value
                                                                                                                              Criterion: Ensurefile(s) named ^.+\.sh$ in /etc/profile.d/ exists and matches pattern (?i)(^\s*|^\s*[^#]+\s+)umask\s+([0-7][0-7][01][0-7]\b|[0-7][0-7][0-7][0-6]\b|[0-7][01][0-7]\b|[0-7][0-7][0-6]\b|(u=[rwx]{0,3},)?(g=[rwx]{0,3},)?o=[rwx]+\b|(u=[rwx]{1,3},)?g=[^rx]{1
                                                                                                                              Existence Check: None Exist
                                                                                                                              Item Check: All
                                                                                                                              Result: Pass
                                                                                                                              No matching system items were found.
                                                                                                                              Criterion: Ensure no file named /etc/profile.local exists and matches pattern (?i)(^\s*|^\s*[^#]+\s+)umask\s+([0-7][0-7][01][0-7]\b|[0-7][0-7][0-7][0-6]\b|[0-7][01][0-7]\b|[0-7][0-7][0-6]\b|(u=[rwx]{0,3},)?(g=[rwx]{0,3},)?o=[rwx]+\b|(u=[rwx]{1,3},)?g=[^rx]{1,3}(,o=[
                                                                                                                              Existence Check: None Exist
                                                                                                                              Item Check: All
                                                                                                                              Result: Pass
                                                                                                                              No matching system items were found.
                                                                                                                              Criterion: Ensure no file named /etc/profile exists and matches pattern (?i)(^\s*|^\s*[^#]+\s+)umask\s+([0-7][0-7][01][0-7]\b|[0-7][0-7][0-7][0-6]\b|[0-7][01][0-7]\b|[0-7][0-7][0-6]\b|(u=[rwx]{0,3},)?(g=[rwx]{0,3},)?o=[rwx]+\b|(u=[rwx]{1,3},)?g=[^rx]{1,3}(,o=[rwx]{0
                                                                                                                              Existence Check: None Exist
                                                                                                                              Item Check: All
                                                                                                                              Result: Pass
                                                                                                                              No matching system items were found.
                                                                                                                              Criterion: Ensure no file named /etc/bash.bash.rc exists and matches pattern (?i)(^\s*|^\s*[^#]+\s+)umask\s+([0-7][0-7][01][0-7]\b|[0-7][0-7][0-7][0-6]\b|[0-7][01][0-7]\b|[0-7][0-7][0-6]\b|(u=[rwx]{0,3},)?(g=[rwx]{0,3},)?o=[rwx]+\b|(u=[rwx]{1,3},)?g=[^rx]{1,3}(,o=[r
                                                                                                                              Existence Check: None Exist
                                                                                                                              Item Check: All
                                                                                                                              Result: Pass
                                                                                                                              No matching system items were found.


                                                                                                                              Show Rule Result XML

                                                                                                                              References:

                                                                                                                              • URL: pam_umask(8)

                                                                                                                              CIS Controls V7.0:

                                                                                                                              • Control 14: Controlled Access Based on the Need to Know: -- More

                                                                                                                              Fail

                                                                                                                              5.5.5 Ensure default user shell timeout is 900 seconds or less

                                                                                                                              Description:

                                                                                                                              TMOUT is an environmental setting that determines the timeout of a shell in seconds.

                                                                                                                              • TMOUT= n - Sets the shell timeout to n seconds. A setting of TMOUT=0 disables timeout.
                                                                                                                              • readonly TMOUT- Sets the TMOUT environmental variable as readonly, preventing unwanted modification during run-time.
                                                                                                                              • export TMOUT - exports the TMOUT variable

                                                                                                                              System Wide Shell Configuration Files:

                                                                                                                              • /etc/profile - used to set system wide environmental variables on users shells. The variables are sometimes the same ones that are in the .bash_profile , however this file is used to set an initial PATH or PS1 for all shell users of the system. is only executed for interactive login shells, or shells executed with the --login parameter.
                                                                                                                              • /etc/profile.d - /etc/profile will execute the scripts within /etc/profile.d/*.sh . It is recommended to place your configuration in a shell script within /etc/profile.d to set your own system wide environmental variables.
                                                                                                                              • /etc/bash.bashrc - System wide version of bash.bashrc . etc/bash.bashrc also invokes /etc/profile.d/*.sh if non-login shell, but redirects output to /dev/null if non-interactive. Is only executed for interactive shells or if BASH_ENV is set to /etc/bash.bashrc .

                                                                                                                              Setting a timeout value reduces the window of opportunity for unauthorized user access to another user's shell session that has been left unattended. It also ends the inactive session and releases the resources associated with that session.

                                                                                                                              Review /etc/bash.bashrc , /etc/profile , and all files ending in *.sh in the /etc/profile.d/ directory and remove or edit all TMOUT=_n_ entries to follow local site policy. TMOUT should not exceed 900 or be equal to 0 .

                                                                                                                              Configure TMOUT in one of the following files:

                                                                                                                              • A file in the /etc/profile.d/ directory ending in .sh
                                                                                                                              • /etc/profile
                                                                                                                              • /etc/bash.bashrc

                                                                                                                              TMOUT configuration examples:

                                                                                                                              • As multiple lines:
                                                                                                                              TMOUT=900

                                                                                                                              readonly TMOUT

                                                                                                                              export TMOUT
                                                                                                                              • As a single line:
                                                                                                                              readonly TMOUT=900 ; export TMOUT

                                                                                                                              Show Assessment Evidence
                                                                                                                              Complex Check
                                                                                                                              AND
                                                                                                                              Script: sce/tmout_chk.sh
                                                                                                                              Result: Fail
                                                                                                                              Exit Value: 102
                                                                                                                              Output:
                                                                                                                              • TMOUT is not configured
                                                                                                                              No error lines were collected.


                                                                                                                              Show Rule Result XML

                                                                                                                              References:

                                                                                                                                CIS Controls V7.0:

                                                                                                                                • Control 16: Account Monitoring and Control: -- More

                                                                                                                                Fail

                                                                                                                                5.7 Ensure access to the su command is restricted

                                                                                                                                Description:

                                                                                                                                The su command allows a user to run a command or shell as another user. The program has been superseded by sudo , which allows for more granular control over privileged access. Normally, the su command can be executed by any user. By adding, or uncommenting, the pam_wheel.so statement in /etc/pam.d/su , the su command will only allow users in a specific group to execute su . This group should be empty to reinforce the use of sudo for privileged access.

                                                                                                                                Restricting the use of su , and using sudo in its place, provides system administrators better control of the escalation of user privileges to execute privileged commands. The sudo utility also provides a better logging and audit mechanism, as it can log each command executed via sudo , whereas su can only record that a user executed the su program.

                                                                                                                                Create an empty group that will be specified for use of the su command. The group should be named according to site policy.

                                                                                                                                Example:

                                                                                                                                # groupadd sugroup

                                                                                                                                Add the following line to the /etc/pam.d/su file, specifying the empty group:

                                                                                                                                Example:

                                                                                                                                auth required pam_wheel.so use_uid group=sugroup

                                                                                                                                Show Assessment Evidence
                                                                                                                                Complex Check
                                                                                                                                AND
                                                                                                                                Criterion: Ensure at least one file named /etc/pam.d/su exists and matches pattern ^\s*auth\s+(?:required|requisite)\s+pam_wheel\.so(?:\s+[^#]+)?(?:\s+(?!\2)(use_uid\b|group=\S+\b))(?:\s+[^#]+)?(?:\s+(?!\1)(use_uid\b|group=\S+\b))
                                                                                                                                Existence Check: At Least One Exists
                                                                                                                                Item Check: All
                                                                                                                                Result: Fail
                                                                                                                                No matching system items were found.


                                                                                                                                Show Rule Result XML

                                                                                                                                References:

                                                                                                                                  CIS Controls V7.0:

                                                                                                                                  • Control 5: Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers: -- More

                                                                                                                                  6 System Maintenance

                                                                                                                                  Recommendations in this section are intended as maintenance and are intended to be checked on a frequent basis to ensure system stability. Many recommendations do not have quick remediations and require investigation into the cause and best fix available and may indicate an attempted breach of system security.

                                                                                                                                  6.1 System File Permissions

                                                                                                                                  This section provides guidance on securing aspects of system files and directories.

                                                                                                                                  Fail

                                                                                                                                  6.1.10 Ensure no world writable files exist

                                                                                                                                  Description:

                                                                                                                                  Unix-based systems support variable settings to control access to files. World writable files are the least secure. See the chmod(2) man page for more information.

                                                                                                                                  Data in world-writable files can be modified and compromised by any user on the system. World writable files may also indicate an incorrectly written script or program that could potentially be the cause of a larger compromise to the system's integrity.

                                                                                                                                  Removing write access for the "other" category ( chmod o-w <filename> ) is advisable, but always consult relevant vendor documentation to avoid breaking any application dependencies on a given file.

                                                                                                                                  Show Assessment Evidence
                                                                                                                                  Complex Check
                                                                                                                                  AND
                                                                                                                                  Script: sce/world_writable_files.sh
                                                                                                                                  Result: Fail
                                                                                                                                  Exit Value: 102
                                                                                                                                  Output:
                                                                                                                                  • World-Writable file /root/sample-asset.yaml
                                                                                                                                  • World-Writable file /tmp/startup-script.sh
                                                                                                                                  • World-Writable file /dev/urandom
                                                                                                                                  • World-Writable file /dev/zero
                                                                                                                                  • World-Writable file /dev/tty
                                                                                                                                  • World-Writable file /dev/full
                                                                                                                                  • World-Writable file /dev/random
                                                                                                                                  • World-Writable file /dev/null
                                                                                                                                  • World-Writable file /dev/kmsg
                                                                                                                                  • World-Writable file /var/lib/docker/overlay2/ab9002e9655039be7e3d59214b50b0e67197ea746866c7545a7e97481e01a17c/diff/opt/fluentd-ui/vendor/bundle/ruby/2.5.0/gems/sucker_punch-1.0.5/spec/sucker_punch/job_spec.rb
                                                                                                                                  • World-Writable file /var/lib/docker/overlay2/ab9002e9655039be7e3d59214b50b0e67197ea746866c7545a7e97481e01a17c/diff/opt/fluentd-ui/vendor/bundle/ruby/2.5.0/gems/sucker_punch-1.0.5/Gemfile
                                                                                                                                  • World-Writable file /var/lib/docker/overlay2/ab9002e9655039be7e3d59214b50b0e67197ea746866c7545a7e97481e01a17c/diff/opt/fluentd-ui/vendor/bundle/ruby/2.5.0/gems/sucker_punch-1.0.5/lib/sucker_punch/version.rb
                                                                                                                                  • World-Writable file /var/lib/docker/overlay2/ab9002e9655039be7e3d59214b50b0e67197ea746866c7545a7e97481e01a17c/diff/opt/fluentd-ui/vendor/bundle/ruby/2.5.0/gems/sucker_punch-1.0.5/CHANGES.md
                                                                                                                                  • World-Writable file /var/lib/docker/overlay2/ab9002e9655039be7e3d59214b50b0e67197ea746866c7545a7e97481e01a17c/diff/opt/fluentd-ui/vendor/bundle/ruby/2.5.0/gems/request_store-1.3.2/request_store.gemspec
                                                                                                                                  • World-Writable file /var/lib/docker/overlay2/ab9002e9655039be7e3d59214b50b0e67197ea746866c7545a7e97481e01a17c/diff/opt/fluentd-ui/vendor/bundle/ruby/2.5.0/gems/request_store-1.3.2/test/middleware_test.rb
                                                                                                                                  • World-Writable file /var/lib/docker/overlay2/ab9002e9655039be7e3d59214b50b0e67197ea746866c7545a7e97481e01a17c/diff/opt/fluentd-ui/vendor/bundle/ruby/2.5.0/gems/request_store-1.3.2/test/test_helper.rb
                                                                                                                                  • World-Writable file /var/lib/docker/overlay2/ab9002e9655039be7e3d59214b50b0e67197ea746866c7545a7e97481e01a17c/diff/opt/fluentd-ui/vendor/bundle/ruby/2.5.0/gems/request_store-1.3.2/test/request_store_test.rb
                                                                                                                                  • World-Writable file /var/lib/docker/overlay2/ab9002e9655039be7e3d59214b50b0e67197ea746866c7545a7e97481e01a17c/diff/opt/fluentd-ui/vendor/bundle/ruby/2.5.0/gems/request_store-1.3.2/README.md
                                                                                                                                  • World-Writable file /var/lib/docker/overlay2/ab9002e9655039be7e3d59214b50b0e67197ea746866c7545a7e97481e01a17c/diff/opt/fluentd-ui/vendor/bundle/ruby/2.5.0/gems/request_store-1.3.2/Gemfile
                                                                                                                                  • World-Writable file /var/lib/docker/overlay2/ab9002e9655039be7e3d59214b50b0e67197ea746866c7545a7e97481e01a17c/diff/opt/fluentd-ui/vendor/bundle/ruby/2.5.0/gems/request_store-1.3.2/lib/request_store.rb
                                                                                                                                  • World-Writable file /var/lib/docker/overlay2/ab9002e9655039be7e3d59214b50b0e67197ea746866c7545a7e97481e01a17c/diff/opt/fluentd-ui/vendor/bundle/ruby/2.5.0/gems/request_store-1.3.2/lib/request_store/middleware.rb
                                                                                                                                  • World-Writable file /var/lib/docker/overlay2/ab9002e9655039be7e3d59214b50b0e67197ea746866c7545a7e97481e01a17c/diff/opt/fluentd-ui/vendor/bundle/ruby/2.5.0/gems/request_store-1.3.2/lib/request_store/railtie.rb
                                                                                                                                  • World-Writable file /var/lib/docker/overlay2/ab9002e9655039be7e3d59214b50b0e67197ea746866c7545a7e97481e01a17c/diff/opt/fluentd-ui/vendor/bundle/ruby/2.5.0/gems/request_store-1.3.2/lib/request_store/version.rb
                                                                                                                                  • World-Writable file /var/lib/docker/overlay2/ab9002e9655039be7e3d59214b50b0e67197ea746866c7545a7e97481e01a17c/diff/opt/fluentd-ui/vendor/bundle/ruby/2.5.0/gems/request_store-1.3.2/.gitignore
                                                                                                                                  • World-Writable file /var/lib/docker/overlay2/ab9002e9655039be7e3d59214b50b0e67197ea746866c7545a7e97481e01a17c/diff/opt/fluentd-ui/vendor/bundle/ruby/2.5.0/gems/request_store-1.3.2/LICENSE.txt
                                                                                                                                  • World-Writable file /var/lib/docker/overlay2/ab9002e9655039be7e3d59214b50b0e67197ea746866c7545a7e97481e01a17c/diff/opt/fluentd-ui/vendor/bundle/ruby/2.5.0/gems/request_store-1.3.2/Rakefile
                                                                                                                                  • World-Writable file /var/lib/docker/overlay2/ab9002e9655039be7e3d59214b50b0e67197ea746866c7545a7e97481e01a17c/diff/opt/fluentd-ui/vendor/bundle/ruby/2.5.0/gems/request_store-1.3.2/.travis.yml
                                                                                                                                  No error lines were collected.


                                                                                                                                  Show Rule Result XML

                                                                                                                                  References:

                                                                                                                                    CIS Controls V7.0:

                                                                                                                                    • Control 14: Controlled Access Based on the Need to Know: -- More

                                                                                                                                    6.2 User and Group Settings

                                                                                                                                    This section provides guidance on securing aspects of the users and groups.

                                                                                                                                    Note: The recommendations in this section check local users and groups. Any users or groups from other sources such as LDAP will not be audited. In a domain environment similar checks should be performed against domain users and groups.

                                                                                                                                    Fail

                                                                                                                                    6.2.4 Ensure all users' home directories exist

                                                                                                                                    Description:

                                                                                                                                    Users can be defined in /etc/passwd without a home directory or with a home directory that does not actually exist.

                                                                                                                                    Note: The audit script checks all users with interactive shells except halt , sync , shutdown , and nfsnobody

                                                                                                                                    If the user's home directory does not exist or is unassigned, the user will be placed in "/" and will not be able to write any files or have local environment variables set.

                                                                                                                                    If any users' home directories do not exist, create them and make sure the respective user owns the directory. Users without an assigned home directory should be removed or assigned a home directory as appropriate.

                                                                                                                                    The following script will create a home directory for users with an interactive shell whose home directory doesn't exist:

                                                                                                                                    #!/bin/bash



                                                                                                                                    awk -F: '($1!~/(halt|sync|shutdown|nfsnobody)/ && $7!~/^(\/usr)?\/sbin\/nologin(\/)?$/ && $7!~/(\/usr)?\/bin\/false(\/)?$/) { print $1 " " $6 }' /etc/passwd | while read -r user dir; do

                                                                                                                                    if [ ! -d "$dir" ]; then

                                                                                                                                    mkdir "$dir"

                                                                                                                                    chmod g-w,o-wrx "$dir"

                                                                                                                                    chown "$user" "$dir"

                                                                                                                                    fi

                                                                                                                                    done

                                                                                                                                    Show Assessment Evidence
                                                                                                                                    Complex Check
                                                                                                                                    AND
                                                                                                                                    Script: sce/users_home_exist.sh
                                                                                                                                    Result: Fail
                                                                                                                                    Exit Value: 102
                                                                                                                                    Output:
                                                                                                                                    • User "john" missing home directory "/home/john"
                                                                                                                                    No error lines were collected.


                                                                                                                                    Show Rule Result XML

                                                                                                                                    References:

                                                                                                                                      CIS Controls V7.0:

                                                                                                                                      • Control 5: Secure Configuration for Hardware and Software on Mobile Devices, Laptops, Workstations and Servers: -- More

                                                                                                                                      Fail

                                                                                                                                      6.2.6 Ensure users' home directories permissions are 750 or more restrictive

                                                                                                                                      Description:

                                                                                                                                      While the system administrator can establish secure permissions for users' home directories, the users can easily override these.

                                                                                                                                      Group or world-writable user home directories may enable malicious users to steal or modify other users' data or to gain another user's system privileges.

                                                                                                                                      Making global modifications to user home directories without alerting the user community can result in unexpected outages and unhappy users. Therefore, it is recommended that a monitoring policy be established to report user file permissions and determine the action to be taken in accordance with site policy.

                                                                                                                                      The following script can be used to remove permissions is excess of 750 from users' home directories:

                                                                                                                                      #!/bin/bash



                                                                                                                                      awk -F: '($1!~/(halt|sync|shutdown)/ && $7!~/^(\/usr)?\/sbin\/nologin(\/)?$/ && $7!~/(\/usr)?\/bin\/false(\/)?$/) {print $6}' /etc/passwd | while read -r dir; do

                                                                                                                                      if [ -d "$dir" ]; then

                                                                                                                                      dirperm=$(stat -L -c "%A" "$dir")

                                                                                                                                      if [ "$(echo "$dirperm" | cut -c6)" != "-" ] || [ "$(echo "$dirperm" | cut -c8)" != "-" ] || [ "$(echo "$dirperm" | cut -c9)" != "-" ] || [ "$(echo "$dirperm" | cut -c10)" != "-" ]; then

                                                                                                                                      chmod g-w,o-rwx "$dir"

                                                                                                                                      fi

                                                                                                                                      fi

                                                                                                                                      done

                                                                                                                                      Show Assessment Evidence
                                                                                                                                      Complex Check
                                                                                                                                      AND
                                                                                                                                      Script: sce/users_home_permissions.sh
                                                                                                                                      Result: Fail
                                                                                                                                      Exit Value: 102
                                                                                                                                      Output:
                                                                                                                                      • User: "admin" home directory: "/home/admin" has permissions: "755"
                                                                                                                                      • WARNING: The following users' home directories don't exist: "john"
                                                                                                                                      No error lines were collected.


                                                                                                                                      Show Rule Result XML

                                                                                                                                      References:

                                                                                                                                        CIS Controls V7.0:

                                                                                                                                        • Control 14: Controlled Access Based on the Need to Know: -- More